@InterfaceAudience.Private public class DisableTableProcedure extends StateMachineProcedure<MasterProcedureEnv,org.apache.hadoop.hbase.protobuf.generated.MasterProcedureProtos.DisableTableState> implements TableProcedureInterface
StateMachineProcedure.FlowTableProcedureInterface.TableOperationType| Constructor and Description |
|---|
DisableTableProcedure() |
DisableTableProcedure(MasterProcedureEnv env,
TableName tableName,
boolean skipTableStateCheck)
Constructor
|
DisableTableProcedure(MasterProcedureEnv env,
TableName tableName,
boolean skipTableStateCheck,
ProcedurePrepareLatch syncLatch)
Constructor
|
execute, rollbackaddStackIndex, beforeReplay, childrenCountDown, compareTo, completionCleanup, convert, convert, doExecute, doRollback, elapsedTime, getException, getLastUpdate, getOwner, getParentProcId, getProcId, getResult, getRootProcedureId, getStackIndexes, getStartTime, getState, getTimeout, getTimeRemaining, hasException, hasOwner, hasParent, hasTimeout, incChildrenLatch, isFailed, isFinished, isSuccess, isWaiting, newInstance, removeStackIndex, setAbortFailure, setChildrenLatch, setFailure, setFailure, setOwner, setParentProcId, setProcId, setResult, setStackIndexes, setStartTime, setState, setTimeout, setTimeoutFailure, toString, updateTimestamp, validateClass, wasExecutedpublic DisableTableProcedure()
public DisableTableProcedure(MasterProcedureEnv env, TableName tableName, boolean skipTableStateCheck) throws IOException
env - MasterProcedureEnvtableName - the table to operate onskipTableStateCheck - whether to check table stateIOExceptionpublic DisableTableProcedure(MasterProcedureEnv env, TableName tableName, boolean skipTableStateCheck, ProcedurePrepareLatch syncLatch) throws IOException
env - MasterProcedureEnvtableName - the table to operate onskipTableStateCheck - whether to check table stateIOExceptionprotected StateMachineProcedure.Flow executeFromState(MasterProcedureEnv env, org.apache.hadoop.hbase.protobuf.generated.MasterProcedureProtos.DisableTableState state)
protected void rollbackState(MasterProcedureEnv env, org.apache.hadoop.hbase.protobuf.generated.MasterProcedureProtos.DisableTableState state) throws IOException
protected org.apache.hadoop.hbase.protobuf.generated.MasterProcedureProtos.DisableTableState getState(int stateId)
protected int getStateId(org.apache.hadoop.hbase.protobuf.generated.MasterProcedureProtos.DisableTableState state)
protected org.apache.hadoop.hbase.protobuf.generated.MasterProcedureProtos.DisableTableState getInitialState()
protected void setNextState(org.apache.hadoop.hbase.protobuf.generated.MasterProcedureProtos.DisableTableState state)
public boolean abort(MasterProcedureEnv env)
abort in class Procedure<MasterProcedureEnv>protected boolean acquireLock(MasterProcedureEnv env)
acquireLock in class Procedure<MasterProcedureEnv>protected void releaseLock(MasterProcedureEnv env)
releaseLock in class Procedure<MasterProcedureEnv>public void serializeStateData(OutputStream stream) throws IOException
public void deserializeStateData(InputStream stream) throws IOException
public void toStringClassDetails(StringBuilder sb)
toStringClassDetails in class Procedure<MasterProcedureEnv>public TableName getTableName()
getTableName in interface TableProcedureInterfacepublic TableProcedureInterface.TableOperationType getTableOperationType()
TableProcedureInterfacegetTableOperationType in interface TableProcedureInterfaceprotected void preDisable(MasterProcedureEnv env, org.apache.hadoop.hbase.protobuf.generated.MasterProcedureProtos.DisableTableState state) throws IOException, InterruptedException
env - MasterProcedureEnvstate - the procedure stateIOExceptionInterruptedExceptionprotected static void setTableStateToDisabling(MasterProcedureEnv env, TableName tableName) throws HBaseException, IOException
env - MasterProcedureEnvIOExceptionHBaseExceptionprotected static org.apache.hadoop.hbase.master.procedure.DisableTableProcedure.MarkRegionOfflineOpResult markRegionsOffline(MasterProcedureEnv env, TableName tableName, Boolean retryRequired) throws IOException
env - MasterProcedureEnvtableName - the target tableretryRequired - whether to retry if the first run failedIOExceptionprotected static void setTableStateToDisabled(MasterProcedureEnv env, TableName tableName) throws HBaseException, IOException
env - MasterProcedureEnvIOExceptionHBaseExceptionprotected void postDisable(MasterProcedureEnv env, org.apache.hadoop.hbase.protobuf.generated.MasterProcedureProtos.DisableTableState state) throws IOException, InterruptedException
env - MasterProcedureEnvstate - the procedure stateIOExceptionInterruptedExceptionCopyright © 2007-2015 The Apache Software Foundation. All Rights Reserved.