Class RegionTransitionProcedure
java.lang.Object
org.apache.hadoop.hbase.procedure2.Procedure<MasterProcedureEnv>
org.apache.hadoop.hbase.master.assignment.RegionTransitionProcedure
- All Implemented Interfaces:
Comparable<Procedure<MasterProcedureEnv>>,TableProcedureInterface,RemoteProcedureDispatcher.RemoteProcedure<MasterProcedureEnv,ServerName>
- Direct Known Subclasses:
AssignProcedure,UnassignProcedure
@Deprecated
@Private
public abstract class RegionTransitionProcedure
extends Procedure<MasterProcedureEnv>
implements TableProcedureInterface, RemoteProcedureDispatcher.RemoteProcedure<MasterProcedureEnv,ServerName>
Deprecated.
Do not use any more.
Leave here only for checking if we can successfully start the master.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.procedure2.Procedure
Procedure.LockStateNested classes/interfaces inherited from interface org.apache.hadoop.hbase.master.procedure.TableProcedureInterface
TableProcedureInterface.TableOperationType -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final AtomicBooleanDeprecated.private intDeprecated.private RegionInfoDeprecated.private org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.RegionTransitionStateDeprecated.Fields inherited from class org.apache.hadoop.hbase.procedure2.Procedure
NO_PROC_ID, NO_TIMEOUT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanabort(MasterProcedureEnv env) Deprecated.The abort() call is asynchronous and each procedure must decide how to deal with it, if they want to be abortable.protected Procedure[]Deprecated.The main code of the procedure.protected abstract voidfinishTransition(MasterProcedureEnv env, RegionStateNode regionNode) Deprecated.protected intDeprecated.Deprecated.Deprecated.Deprecated.Deprecated.Returns the name of the table the procedure is operating on(package private) org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.RegionTransitionStateDeprecated.booleanisMeta()Deprecated.protected abstract booleanisRollbackSupported(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.RegionTransitionState state) Deprecated.remoteCallBuild(MasterProcedureEnv env, ServerName serverName) Deprecated.For building the remote operation.protected abstract booleanremoteCallFailed(MasterProcedureEnv env, RegionStateNode regionNode, IOException exception) Deprecated.voidremoteCallFailed(MasterProcedureEnv env, ServerName serverName, IOException exception) Deprecated.Called when the executeProcedure call is failed.voidDeprecated.Called when RS tells the remote procedure is succeeded through thereportProcedureDonemethod.voidDeprecated.Called when RS tells the remote procedure is failed through thereportProcedureDonemethod.protected abstract voidreportTransition(MasterProcedureEnv env, RegionStateNode regionNode, org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.RegionStateTransition.TransitionCode code, long seqId) Deprecated.protected voidDeprecated.The code to undo what was done by the execute() code.protected voidsetAttempt(int attempt) Deprecated.voidsetRegionInfo(RegionInfo regionInfo) Deprecated.(package private) voidsetTransitionState(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.RegionTransitionState state) Deprecated.protected abstract booleanstartTransition(MasterProcedureEnv env, RegionStateNode regionNode) Deprecated.voidDeprecated.Extend the toString() information with the procedure details e.g.protected voidtoStringState(StringBuilder builder) Deprecated.Called fromProcedure.toString()when interpolatingProcedureState.protected abstract booleanupdateTransition(MasterProcedureEnv env, RegionStateNode regionNode) Deprecated.Methods inherited from class org.apache.hadoop.hbase.procedure2.Procedure
acquireLock, addStackIndex, afterReplay, beforeReplay, bypass, compareTo, completionCleanup, deserializeStateData, doExecute, doRollback, elapsedTime, getChildrenLatch, getException, getLastUpdate, getNonceKey, getOwner, getParentProcId, getProcedureMetrics, getProcId, getProcIdHashCode, getResult, getRootProcedureId, getRootProcId, getStackIndexes, getState, getSubmittedTime, getTimeout, getTimeoutTimestamp, hasChildren, hasException, hasLock, hasOwner, hasParent, hasTimeout, haveSameParent, holdLock, incChildrenLatch, isBypass, isFailed, isFinished, isInitializing, isLockedWhenLoading, isRollbackSupported, isRunnable, isSuccess, isWaiting, isYieldAfterExecutionStep, releaseLock, removeStackIndex, serializeStateData, setAbortFailure, setChildrenLatch, setExecuted, setFailure, setFailure, setLastUpdate, setNonceKey, setOwner, setOwner, setParentProcId, setProcId, setResult, setRootProcId, setStackIndexes, setState, setSubmittedTime, setTimeout, setTimeoutFailure, shouldWaitClientAck, skipPersistence, suspend, toString, toStringClass, toStringDetails, toStringSimpleSB, updateMetricsOnFinish, updateMetricsOnSubmit, updateTimestamp, waitInitialized, wasExecutedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.hadoop.hbase.procedure2.RemoteProcedureDispatcher.RemoteProcedure
storeInDispatchedQueueMethods inherited from interface org.apache.hadoop.hbase.master.procedure.TableProcedureInterface
getTableOperationType
-
Field Details
-
aborted
Deprecated. -
transitionState
private org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.RegionTransitionState transitionStateDeprecated. -
regionInfo
Deprecated. -
attempt
Deprecated.
-
-
Constructor Details
-
RegionTransitionProcedure
public RegionTransitionProcedure()Deprecated. -
RegionTransitionProcedure
Deprecated.
-
-
Method Details
-
getRegionInfo
Deprecated. -
setRegionInfo
Deprecated. -
setAttempt
Deprecated. -
getAttempt
Deprecated. -
getTableName
Deprecated.Description copied from interface:TableProcedureInterfaceReturns the name of the table the procedure is operating on- Specified by:
getTableNamein interfaceTableProcedureInterface
-
isMeta
Deprecated. -
toStringClassDetails
Deprecated.Description copied from class:ProcedureExtend the toString() information with the procedure details e.g. className and parameters- Overrides:
toStringClassDetailsin classProcedure<MasterProcedureEnv>- Parameters:
sb- the string builder to use to append the proc specific information
-
getProcName
Deprecated.- Overrides:
getProcNamein classProcedure<MasterProcedureEnv>
-
getRegionState
Deprecated. -
setTransitionState
void setTransitionState(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.RegionTransitionState state) Deprecated. -
getTransitionState
org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.RegionTransitionState getTransitionState()Deprecated. -
startTransition
protected abstract boolean startTransition(MasterProcedureEnv env, RegionStateNode regionNode) throws IOException, ProcedureSuspendedException Deprecated. -
updateTransition
protected abstract boolean updateTransition(MasterProcedureEnv env, RegionStateNode regionNode) throws IOException, ProcedureSuspendedException Deprecated. -
finishTransition
protected abstract void finishTransition(MasterProcedureEnv env, RegionStateNode regionNode) throws IOException, ProcedureSuspendedException Deprecated. -
reportTransition
protected abstract void reportTransition(MasterProcedureEnv env, RegionStateNode regionNode, org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.RegionStateTransition.TransitionCode code, long seqId) throws UnexpectedStateException Deprecated.- Throws:
UnexpectedStateException
-
remoteCallBuild
public abstract Optional<RemoteProcedureDispatcher.RemoteOperation> remoteCallBuild(MasterProcedureEnv env, ServerName serverName) Deprecated.Description copied from interface:RemoteProcedureDispatcher.RemoteProcedureFor building the remote operation. May be empty if no need to send remote call. Usually, this means the RemoteProcedure has been finished already. This is possible, as we may have already sent the procedure to RS but then the rpc connection is broken so the executeProcedures call fails, but the RS does receive the procedure and execute it and then report back, before we retry again.- Specified by:
remoteCallBuildin interfaceRemoteProcedureDispatcher.RemoteProcedure<MasterProcedureEnv,ServerName>
-
remoteCallFailed
protected abstract boolean remoteCallFailed(MasterProcedureEnv env, RegionStateNode regionNode, IOException exception) Deprecated. -
remoteCallFailed
Deprecated.Description copied from interface:RemoteProcedureDispatcher.RemoteProcedureCalled when the executeProcedure call is failed.- Specified by:
remoteCallFailedin interfaceRemoteProcedureDispatcher.RemoteProcedure<MasterProcedureEnv,ServerName>
-
toStringState
Deprecated.Description copied from class:ProcedureCalled fromProcedure.toString()when interpolatingProcedureState. Allows decorating generic Procedure State with Procedure particulars.- Overrides:
toStringStatein classProcedure<MasterProcedureEnv>- Parameters:
builder- Append currentProcedureProtos.ProcedureState
-
execute
Deprecated.Description copied from class:ProcedureThe main code of the procedure. It must be idempotent since execute() may be called multiple times in case of machine failure in the middle of the execution.- Specified by:
executein classProcedure<MasterProcedureEnv>- Parameters:
env- the environment passed to the ProcedureExecutor- Returns:
- a set of sub-procedures to run or ourselves if there is more work to do or null if the procedure is done.
-
rollback
Deprecated.Description copied from class:ProcedureThe code to undo what was done by the execute() code. It is called when the procedure or one of the sub-procedures failed or an abort was requested. It should cleanup all the resources created by the execute() call. The implementation must be idempotent since rollback() may be called multiple time in case of machine failure in the middle of the execution.- Specified by:
rollbackin classProcedure<MasterProcedureEnv>- Parameters:
env- the environment passed to the ProcedureExecutor
-
isRollbackSupported
protected abstract boolean isRollbackSupported(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.RegionTransitionState state) Deprecated. -
abort
Deprecated.Description copied from class:ProcedureThe abort() call is asynchronous and each procedure must decide how to deal with it, if they want to be abortable. The simplest implementation is to have an AtomicBoolean set in the abort() method and then the execute() will check if the abort flag is set or not. abort() may be called multiple times from the client, so the implementation must be idempotent.NOTE: abort() is not like Thread.interrupt(). It is just a notification that allows the procedure implementor abort.
- Specified by:
abortin classProcedure<MasterProcedureEnv>
-
remoteOperationCompleted
Deprecated.Description copied from interface:RemoteProcedureDispatcher.RemoteProcedureCalled when RS tells the remote procedure is succeeded through thereportProcedureDonemethod.- Specified by:
remoteOperationCompletedin interfaceRemoteProcedureDispatcher.RemoteProcedure<MasterProcedureEnv,ServerName>
-
remoteOperationFailed
Deprecated.Description copied from interface:RemoteProcedureDispatcher.RemoteProcedureCalled when RS tells the remote procedure is failed through thereportProcedureDonemethod.- Specified by:
remoteOperationFailedin interfaceRemoteProcedureDispatcher.RemoteProcedure<MasterProcedureEnv,ServerName>
-