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.LockState
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.master.procedure.TableProcedureInterface
TableProcedureInterface.TableOperationType
-
Field Summary
Modifier and TypeFieldDescriptionprotected final AtomicBoolean
Deprecated.private int
Deprecated.private RegionInfo
Deprecated.private org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.RegionTransitionState
Deprecated.Fields inherited from class org.apache.hadoop.hbase.procedure2.Procedure
NO_PROC_ID, NO_TIMEOUT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
abort
(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 void
finishTransition
(MasterProcedureEnv env, RegionStateNode regionNode) Deprecated.protected int
Deprecated.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.RegionTransitionState
Deprecated.boolean
isMeta()
Deprecated.protected abstract boolean
isRollbackSupported
(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.RegionTransitionState state) Deprecated.remoteCallBuild
(MasterProcedureEnv env, ServerName serverName) Deprecated.For building the remote operation.protected abstract boolean
remoteCallFailed
(MasterProcedureEnv env, RegionStateNode regionNode, IOException exception) Deprecated.void
remoteCallFailed
(MasterProcedureEnv env, ServerName serverName, IOException exception) Deprecated.Called when the executeProcedure call is failed.void
Deprecated.Called when RS tells the remote procedure is succeeded through thereportProcedureDone
method.void
Deprecated.Called when RS tells the remote procedure is failed through thereportProcedureDone
method.protected abstract void
reportTransition
(MasterProcedureEnv env, RegionStateNode regionNode, org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.RegionStateTransition.TransitionCode code, long seqId) Deprecated.protected void
Deprecated.The code to undo what was done by the execute() code.protected void
setAttempt
(int attempt) Deprecated.void
setRegionInfo
(RegionInfo regionInfo) Deprecated.(package private) void
setTransitionState
(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.RegionTransitionState state) Deprecated.protected abstract boolean
startTransition
(MasterProcedureEnv env, RegionStateNode regionNode) Deprecated.void
Deprecated.Extend the toString() information with the procedure details e.g.protected void
toStringState
(StringBuilder builder) Deprecated.Called fromProcedure.toString()
when interpolatingProcedure
State.protected abstract boolean
updateTransition
(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, wasExecuted
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.procedure2.RemoteProcedureDispatcher.RemoteProcedure
storeInDispatchedQueue
Methods 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:TableProcedureInterface
Returns the name of the table the procedure is operating on- Specified by:
getTableName
in interfaceTableProcedureInterface
-
isMeta
Deprecated. -
toStringClassDetails
Deprecated.Description copied from class:Procedure
Extend the toString() information with the procedure details e.g. className and parameters- Overrides:
toStringClassDetails
in classProcedure<MasterProcedureEnv>
- Parameters:
sb
- the string builder to use to append the proc specific information
-
getProcName
Deprecated.- Overrides:
getProcName
in 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.RemoteProcedure
For 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:
remoteCallBuild
in interfaceRemoteProcedureDispatcher.RemoteProcedure<MasterProcedureEnv,
ServerName>
-
remoteCallFailed
protected abstract boolean remoteCallFailed(MasterProcedureEnv env, RegionStateNode regionNode, IOException exception) Deprecated. -
remoteCallFailed
Deprecated.Description copied from interface:RemoteProcedureDispatcher.RemoteProcedure
Called when the executeProcedure call is failed.- Specified by:
remoteCallFailed
in interfaceRemoteProcedureDispatcher.RemoteProcedure<MasterProcedureEnv,
ServerName>
-
toStringState
Deprecated.Description copied from class:Procedure
Called fromProcedure.toString()
when interpolatingProcedure
State. Allows decorating generic Procedure State with Procedure particulars.- Overrides:
toStringState
in classProcedure<MasterProcedureEnv>
- Parameters:
builder
- Append currentProcedureProtos.ProcedureState
-
execute
Deprecated.Description copied from class:Procedure
The 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:
execute
in 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:Procedure
The 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:
rollback
in 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:Procedure
The 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:
abort
in classProcedure<MasterProcedureEnv>
-
remoteOperationCompleted
Deprecated.Description copied from interface:RemoteProcedureDispatcher.RemoteProcedure
Called when RS tells the remote procedure is succeeded through thereportProcedureDone
method.- Specified by:
remoteOperationCompleted
in interfaceRemoteProcedureDispatcher.RemoteProcedure<MasterProcedureEnv,
ServerName>
-
remoteOperationFailed
Deprecated.Description copied from interface:RemoteProcedureDispatcher.RemoteProcedure
Called when RS tells the remote procedure is failed through thereportProcedureDone
method.- Specified by:
remoteOperationFailed
in interfaceRemoteProcedureDispatcher.RemoteProcedure<MasterProcedureEnv,
ServerName>
-