private LockInterface setupNamespaceLock() throws IllegalArgumentException {
    this.tableName = TableProcedureInterface.DUMMY_NAMESPACE_TABLE_NAME;
    switch (type) {
      case EXCLUSIVE:
        this.opType = TableOperationType.EDIT;
        return new NamespaceExclusiveLock();
      case SHARED:
        LOG.error("Shared lock on namespace not supported for " + toString());
        throw new IllegalArgumentException("Shared lock on namespace not supported");
      default:
        LOG.error("Unexpected lock type " + toString());
        throw new IllegalArgumentException("Wrong lock type: " + type.toString());
    }
  }
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