@InterfaceAudience.Private public class DisableTableProcedure extends AbstractStateMachineTableProcedure<org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.DisableTableState>
StateMachineProcedure.FlowProcedure.LockStateTableProcedureInterface.TableOperationType| Modifier and Type | Field and Description | 
|---|---|
| private static org.slf4j.Logger | LOG | 
| private boolean | skipTableStateCheck | 
| private TableName | tableName | 
| private Boolean | traceEnabled | 
stateCountNO_PROC_ID, NO_TIMEOUT| Constructor and Description | 
|---|
| DisableTableProcedure() | 
| DisableTableProcedure(MasterProcedureEnv env,
                     TableName tableName,
                     boolean skipTableStateCheck)Constructor | 
| DisableTableProcedure(MasterProcedureEnv env,
                     TableName tableName,
                     boolean skipTableStateCheck,
                     ProcedurePrepareLatch syncLatch)Constructor | 
| Modifier and Type | Method and Description | 
|---|---|
| protected void | deserializeStateData(ProcedureStateSerializer serializer)Called on store load to allow the user to decode the previously serialized
 state. | 
| protected StateMachineProcedure.Flow | executeFromState(MasterProcedureEnv env,
                org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.DisableTableState state)called to perform a single step of the specified 'state' of the procedure | 
| protected org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.DisableTableState | getInitialState()Return the initial state object that will be used for the first call to executeFromState(). | 
| protected org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.DisableTableState | getState(int stateId)Convert an ordinal (or state id) to an Enum (or more descriptive) state object. | 
| protected int | getStateId(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.DisableTableState state)Convert the Enum (or more descriptive) state object to an ordinal (or state id). | 
| TableName | getTableName() | 
| TableProcedureInterface.TableOperationType | getTableOperationType()Given an operation type we can take decisions about what to do with pending operations. | 
| protected boolean | isRollbackSupported(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.DisableTableState state)Used by the default implementation of abort() to know if the current state can be aborted
 and rollback can be triggered. | 
| private Boolean | isTraceEnabled()The procedure could be restarted from a different machine. | 
| protected void | postDisable(MasterProcedureEnv env,
           org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.DisableTableState state)Action after disabling table. | 
| protected void | preDisable(MasterProcedureEnv env,
          org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.DisableTableState state)Action before disabling table. | 
| private boolean | prepareDisable(MasterProcedureEnv env)Action before any real action of disabling table. | 
| protected void | rollbackState(MasterProcedureEnv env,
             org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.DisableTableState state)called to perform the rollback of the specified state | 
| private void | runCoprocessorAction(MasterProcedureEnv env,
                    org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.DisableTableState state)Coprocessor Action. | 
| protected void | serializeStateData(ProcedureStateSerializer serializer)The user-level code of the procedure may have some state to
 persist (e.g. | 
| protected static void | setTableStateToDisabled(MasterProcedureEnv env,
                       TableName tableName)Mark table state to Disabled | 
| protected static void | setTableStateToDisabling(MasterProcedureEnv env,
                        TableName tableName)Mark table state to Disabling | 
acquireLock, checkOnline, checkTableModifiable, getRegionDir, getUser, getWALRegionDir, preflightChecks, releaseLock, releaseSyncLatch, setUser, toStringClassDetails, waitInitializedabort, addChildProcedure, execute, failIfAborted, getCurrentState, getCurrentStateId, getCycles, isEofState, isYieldAfterExecutionStep, isYieldBeforeExecuteFromState, rollback, setNextState, toStringStateaddStackIndex, afterReplay, beforeReplay, bypass, compareTo, completionCleanup, doExecute, doRollback, elapsedTime, getChildrenLatch, getException, getLastUpdate, getNonceKey, getOwner, getParentProcId, getProcedureMetrics, getProcId, getProcIdHashCode, getProcName, getResult, getRootProcedureId, getRootProcId, getStackIndexes, getState, getSubmittedTime, getTimeout, getTimeoutTimestamp, hasChildren, hasException, hasLock, hasOwner, hasParent, hasTimeout, haveSameParent, holdLock, incChildrenLatch, isBypass, isFailed, isFinished, isInitializing, isLockedWhenLoading, isRunnable, isSuccess, isWaiting, removeStackIndex, setAbortFailure, setChildrenLatch, setFailure, setFailure, setLastUpdate, setNonceKey, setOwner, setOwner, setParentProcId, setProcId, setResult, setRootProcId, setStackIndexes, setState, setSubmittedTime, setTimeout, setTimeoutFailure, shouldWaitClientAck, skipPersistence, toString, toStringClass, toStringDetails, toStringSimpleSB, updateMetricsOnFinish, updateMetricsOnSubmit, updateTimestamp, wasExecutedprivate static final org.slf4j.Logger LOG
private boolean skipTableStateCheck
private Boolean traceEnabled
public DisableTableProcedure()
public DisableTableProcedure(MasterProcedureEnv env, TableName tableName, boolean skipTableStateCheck) throws HBaseIOException
env - MasterProcedureEnvtableName - the table to operate onskipTableStateCheck - whether to check table stateHBaseIOExceptionpublic DisableTableProcedure(MasterProcedureEnv env, TableName tableName, boolean skipTableStateCheck, ProcedurePrepareLatch syncLatch) throws HBaseIOException
env - MasterProcedureEnvtableName - the table to operate onskipTableStateCheck - whether to check table stateHBaseIOExceptionprotected StateMachineProcedure.Flow executeFromState(MasterProcedureEnv env, org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.DisableTableState state) throws InterruptedException
StateMachineProcedureexecuteFromState in class StateMachineProcedure<MasterProcedureEnv,org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.DisableTableState>state - state to executeInterruptedExceptionprotected void rollbackState(MasterProcedureEnv env, org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.DisableTableState state) throws IOException
StateMachineProcedurerollbackState in class StateMachineProcedure<MasterProcedureEnv,org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.DisableTableState>state - state to rollbackIOException - temporary failure, the rollback will retry laterprotected boolean isRollbackSupported(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.DisableTableState state)
StateMachineProcedureisRollbackSupported in class StateMachineProcedure<MasterProcedureEnv,org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.DisableTableState>protected org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.DisableTableState getState(int stateId)
StateMachineProceduregetState in class StateMachineProcedure<MasterProcedureEnv,org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.DisableTableState>stateId - the ordinal() of the state enum (or state id)protected int getStateId(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.DisableTableState state)
StateMachineProceduregetStateId in class StateMachineProcedure<MasterProcedureEnv,org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.DisableTableState>state - the state enum objectprotected org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.DisableTableState getInitialState()
StateMachineProceduregetInitialState in class StateMachineProcedure<MasterProcedureEnv,org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.DisableTableState>protected void serializeStateData(ProcedureStateSerializer serializer) throws IOException
ProcedureserializeStateData in class StateMachineProcedure<MasterProcedureEnv,org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.DisableTableState>serializer - stores the serializable stateIOExceptionprotected void deserializeStateData(ProcedureStateSerializer serializer) throws IOException
ProceduredeserializeStateData in class StateMachineProcedure<MasterProcedureEnv,org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.DisableTableState>serializer - contains the serialized stateIOExceptionpublic TableName getTableName()
getTableName in interface TableProcedureInterfacegetTableName in class AbstractStateMachineTableProcedure<org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.DisableTableState>public TableProcedureInterface.TableOperationType getTableOperationType()
TableProcedureInterfacegetTableOperationType in interface TableProcedureInterfacegetTableOperationType in class AbstractStateMachineTableProcedure<org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.DisableTableState>private boolean prepareDisable(MasterProcedureEnv env) throws IOException
env - MasterProcedureEnvIOExceptionprotected void preDisable(MasterProcedureEnv env, org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.DisableTableState state) throws IOException, InterruptedException
env - MasterProcedureEnvstate - the procedure stateIOExceptionInterruptedExceptionprotected static void setTableStateToDisabling(MasterProcedureEnv env, TableName tableName) throws IOException
env - MasterProcedureEnvIOExceptionprotected static void setTableStateToDisabled(MasterProcedureEnv env, TableName tableName) throws IOException
env - MasterProcedureEnvIOExceptionprotected void postDisable(MasterProcedureEnv env, org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.DisableTableState state) throws IOException, InterruptedException
env - MasterProcedureEnvstate - the procedure stateIOExceptionInterruptedExceptionprivate Boolean isTraceEnabled()
private void runCoprocessorAction(MasterProcedureEnv env, org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.DisableTableState state) throws IOException, InterruptedException
env - MasterProcedureEnvstate - the procedure stateIOExceptionInterruptedExceptionCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.