private void runCoprocessorAction(final MasterProcedureEnv env, final DisableTableState state)
    throws IOException, InterruptedException {
    final MasterCoprocessorHost cpHost = env.getMasterCoprocessorHost();
    if (cpHost != null) {
      switch (state) {
        case DISABLE_TABLE_PRE_OPERATION:
          cpHost.preDisableTableAction(tableName, getUser());
          break;
        case DISABLE_TABLE_POST_OPERATION:
          cpHost.postCompletedDisableTableAction(tableName, getUser());
          break;
        default:
          throw new UnsupportedOperationException(this + " unhandled state=" + state);
      }
    }
  }
Coprocessor Action.
@param env   MasterProcedureEnv
@param state the procedure state
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/DisableTableProcedure.java