public ReentrantLock acquireLock(K key) {
    if (key == null) throw new IllegalArgumentException("key must not be null");

    lockPool.purge();
    ReentrantLock lock = lockPool.get(key);

    lock.lock();
    return lock;
  }
Return a lock for the given key. The lock is already locked.
hbase-common/src/main/java/org/apache/hadoop/hbase/util/KeyLocker.java