@InterfaceAudience.Private public class GCRegionProcedure extends AbstractStateMachineRegionProcedure<MasterProcedureProtos.GCRegionState>
This is a Region StateMachine Procedure. We take a read lock on the Table and then exclusive on the Region.
StateMachineProcedure.FlowProcedure.LockStateTableProcedureInterface.TableOperationTypestateCountNO_PROC_ID, NO_TIMEOUT| Constructor and Description |
|---|
GCRegionProcedure() |
GCRegionProcedure(MasterProcedureEnv env,
RegionInfo hri) |
| 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,
MasterProcedureProtos.GCRegionState state)
called to perform a single step of the specified 'state' of the procedure
|
protected MasterProcedureProtos.GCRegionState |
getInitialState()
Return the initial state object that will be used for the first call to executeFromState().
|
protected MasterProcedureProtos.GCRegionState |
getState(int stateId)
Convert an ordinal (or state id) to an Enum (or more descriptive) state object.
|
protected int |
getStateId(MasterProcedureProtos.GCRegionState state)
Convert the Enum (or more descriptive) state object to an ordinal (or state id).
|
TableProcedureInterface.TableOperationType |
getTableOperationType()
Given an operation type we can take decisions about what to do with pending operations.
|
protected void |
rollbackState(MasterProcedureEnv env,
MasterProcedureProtos.GCRegionState state)
called to perform the rollback of the specified state
|
protected void |
serializeStateData(ProcedureStateSerializer serializer)
The user-level code of the procedure may have some state to
persist (e.g.
|
acquireLock, checkTableModifiable, getRegion, getTableName, holdLock, releaseLock, setFailure, setRegion, toStringClassDetailscheckOnline, getUser, getWALRegionDir, preflightChecks, releaseSyncLatch, setUser, waitInitializedabort, addChildProcedure, execute, failIfAborted, getCurrentState, getCurrentStateId, getCycles, isEofState, isRollbackSupported, 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, 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, wasExecutedpublic GCRegionProcedure(MasterProcedureEnv env, RegionInfo hri)
public GCRegionProcedure()
public TableProcedureInterface.TableOperationType getTableOperationType()
TableProcedureInterfacegetTableOperationType in interface TableProcedureInterfacegetTableOperationType in class AbstractStateMachineRegionProcedure<MasterProcedureProtos.GCRegionState>protected StateMachineProcedure.Flow executeFromState(MasterProcedureEnv env, MasterProcedureProtos.GCRegionState state) throws ProcedureSuspendedException, ProcedureYieldException, InterruptedException
StateMachineProcedureexecuteFromState in class StateMachineProcedure<MasterProcedureEnv,MasterProcedureProtos.GCRegionState>state - state to executeProcedureSuspendedExceptionProcedureYieldExceptionInterruptedExceptionprotected void rollbackState(MasterProcedureEnv env, MasterProcedureProtos.GCRegionState state) throws IOException, InterruptedException
StateMachineProcedurerollbackState in class StateMachineProcedure<MasterProcedureEnv,MasterProcedureProtos.GCRegionState>state - state to rollbackIOException - temporary failure, the rollback will retry laterInterruptedExceptionprotected MasterProcedureProtos.GCRegionState getState(int stateId)
StateMachineProceduregetState in class StateMachineProcedure<MasterProcedureEnv,MasterProcedureProtos.GCRegionState>stateId - the ordinal() of the state enum (or state id)protected int getStateId(MasterProcedureProtos.GCRegionState state)
StateMachineProceduregetStateId in class StateMachineProcedure<MasterProcedureEnv,MasterProcedureProtos.GCRegionState>state - the state enum objectprotected MasterProcedureProtos.GCRegionState getInitialState()
StateMachineProceduregetInitialState in class StateMachineProcedure<MasterProcedureEnv,MasterProcedureProtos.GCRegionState>protected void serializeStateData(ProcedureStateSerializer serializer) throws IOException
ProcedureserializeStateData in class AbstractStateMachineRegionProcedure<MasterProcedureProtos.GCRegionState>serializer - stores the serializable stateIOExceptionprotected void deserializeStateData(ProcedureStateSerializer serializer) throws IOException
ProceduredeserializeStateData in class AbstractStateMachineRegionProcedure<MasterProcedureProtos.GCRegionState>serializer - contains the serialized stateIOExceptionCopyright © 2007–2019 Cloudera. All rights reserved.