public TestPeerProcedure acquire() {
      TestPeerProcedure proc = null;
      boolean waiting = true;
      while (waiting && queue.size() > 0) {
        proc = (TestPeerProcedure) queue.poll(100000000L);
        if (proc == null) {
          continue;
        }
        switch (proc.getPeerOperationType()) {
          case ADD:
          case REMOVE:
          case ENABLE:
          case DISABLE:
          case UPDATE_CONFIG:
            waiting = queue.waitPeerExclusiveLock(proc, proc.getPeerId());
            break;
          case REFRESH:
            waiting = false;
            break;
          default:
            throw new UnsupportedOperationException();
        }
      }
      return proc;
    }
Verify that "write" operations for a single table are serialized, but different tables can be
executed in parallel.
hbase-server/src/test/java/org/apache/hadoop/hbase/master/procedure/TestMasterProcedureSchedulerConcurrency.java