private LockInterface setupRegionLock() throws IllegalArgumentException {
    this.tableName = regionInfos[0].getTable();
    switch (type) {
      case EXCLUSIVE:
        this.opType = TableOperationType.REGION_EDIT;
        return new RegionExclusiveLock();
      default:
        LOG.error("Only exclusive lock supported on regions for " + toString());
        throw new IllegalArgumentException("Only exclusive lock supported on regions.");
    }
  }
On recovery, re-execute from start to acquire the locks. Need to explicitly set it to RUNNABLE
because the procedure might have been in WAITING_TIMEOUT state when crash happened. In which
case, it'll be sent back to timeout queue on recovery, which we don't want since we want to
require locks.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/locking/LockProcedure.java