public long requestRegionsLock(final RegionInfo[] regionInfos, final String description,
      final NonceKey nonceKey) throws IllegalArgumentException, IOException {
      master.getMasterCoprocessorHost().preRequestLock(null, null, regionInfos, LockType.EXCLUSIVE,
        description);
      final LockProcedure proc = new LockProcedure(master.getConfiguration(), regionInfos,
        LockType.EXCLUSIVE, description, null);
      submitProcedure(proc, nonceKey);
      master.getMasterCoprocessorHost().postRequestLock(null, null, regionInfos, LockType.EXCLUSIVE,
        description);
      return proc.getProcId();
    }
@throws IllegalArgumentException if all regions are not from same table.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/locking/LockManager.java