public long requestNamespaceLock(final String namespace, final LockType type,
      final String description, final NonceKey nonceKey)
      throws IllegalArgumentException, IOException {
      master.getMasterCoprocessorHost().preRequestLock(namespace, null, null, type, description);
      final LockProcedure proc =
        new LockProcedure(master.getConfiguration(), namespace, type, description, null);
      submitProcedure(proc, nonceKey);
      master.getMasterCoprocessorHost().postRequestLock(namespace, null, null, type, description);
      return proc.getProcId();
    }
Locks on namespace/table/regions for remote operations. Since remote operations are unreliable
and the client/RS may die anytime and never release locks, regular heartbeats are required to
keep the lock held.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/locking/LockManager.java