@InterfaceAudience.Private public abstract class AbstractCloseTableRegionsProcedure<TState extends Enum<?>> extends AbstractStateMachineTableProcedure<TState>
StateMachineProcedure.FlowProcedure.LockStateTableProcedureInterface.TableOperationType| Modifier and Type | Field and Description |
|---|---|
protected TableName |
tableName |
stateCountNO_PROC_ID, NO_TIMEOUT| Modifier | Constructor and Description |
|---|---|
protected |
AbstractCloseTableRegionsProcedure() |
protected |
AbstractCloseTableRegionsProcedure(TableName tableName) |
| Modifier and Type | Method and Description |
|---|---|
protected StateMachineProcedure.Flow |
executeFromState(MasterProcedureEnv env,
TState state) |
protected abstract TState |
getConfirmState()
We have two state for this type of procedures, the initial state for scheduling unassign
procedures, and the confirm state for checking whether we have unassigned all the regions.
|
TableName |
getTableName()
Returns the name of the table the procedure is operating on
|
TableProcedureInterface.TableOperationType |
getTableOperationType()
Given an operation type we can take decisions about what to do with pending operations.
|
protected abstract int |
numberOfUnclosedRegions(MasterProcedureEnv env)
Return the number of uncloses regions.
|
protected void |
rollbackState(MasterProcedureEnv env,
TState state) |
protected boolean |
setTimeoutFailure(MasterProcedureEnv env) |
protected abstract int |
submitUnassignProcedure(MasterProcedureEnv env,
Consumer<TransitRegionStateProcedure> submit)
Submit TRSP for unassigning regions.
|
acquireLock, checkOnline, checkTableModifiable, getUser, getWALRegionDir, isTableEnabled, preflightChecks, releaseLock, releaseSyncLatch, setUser, toStringClassDetails, waitInitializedabort, addChildProcedure, deserializeStateData, execute, failIfAborted, getCurrentState, getCurrentStateId, getCycles, getInitialState, getState, getStateId, isEofState, isRollbackSupported, isRollbackSupported, isYieldAfterExecutionStep, isYieldBeforeExecuteFromState, rollback, serializeStateData, 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, setExecuted, setFailure, setFailure, setLastUpdate, setNonceKey, setOwner, setOwner, setParentProcId, setProcId, setResult, setRootProcId, setStackIndexes, setState, setSubmittedTime, setTimeout, shouldWaitClientAck, skipPersistence, suspend, toString, toStringClass, toStringDetails, toStringSimpleSB, updateMetricsOnFinish, updateMetricsOnSubmit, updateTimestamp, wasExecutedprotected TableName tableName
protected AbstractCloseTableRegionsProcedure()
protected AbstractCloseTableRegionsProcedure(TableName tableName)
public TableName getTableName()
TableProcedureInterfacegetTableName in interface TableProcedureInterfacegetTableName in class AbstractStateMachineTableProcedure<TState extends Enum<?>>public TableProcedureInterface.TableOperationType getTableOperationType()
TableProcedureInterfacegetTableOperationType in interface TableProcedureInterfacegetTableOperationType in class AbstractStateMachineTableProcedure<TState extends Enum<?>>protected StateMachineProcedure.Flow executeFromState(MasterProcedureEnv env, TState state) throws ProcedureSuspendedException, ProcedureYieldException, InterruptedException
executeFromState in class StateMachineProcedure<MasterProcedureEnv,TState extends Enum<?>>ProcedureSuspendedExceptionProcedureYieldExceptionInterruptedExceptionprotected void rollbackState(MasterProcedureEnv env, TState state) throws IOException, InterruptedException
rollbackState in class StateMachineProcedure<MasterProcedureEnv,TState extends Enum<?>>IOExceptionInterruptedExceptionprotected boolean setTimeoutFailure(MasterProcedureEnv env)
setTimeoutFailure in class Procedure<MasterProcedureEnv>protected abstract TState getConfirmState()
protected abstract int submitUnassignProcedure(MasterProcedureEnv env, Consumer<TransitRegionStateProcedure> submit)
protected abstract int numberOfUnclosedRegions(MasterProcedureEnv env)
0 means we are done.Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.