public MasterLock createMasterLock(final RegionInfo[] regionInfos, final String description) {
    return new MasterLock(regionInfos, description);
  }
Functions to acquire lock on table/namespace/regions.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/locking/LockManager.java