@Deprecated @InterfaceAudience.Private public abstract class RegionTransitionProcedure extends Procedure<MasterProcedureEnv> implements TableProcedureInterface, RemoteProcedureDispatcher.RemoteProcedure<MasterProcedureEnv,ServerName>
TransitRegionStateProcedure
Procedure.LockState
TableProcedureInterface.TableOperationType
Modifier and Type | Field and Description |
---|---|
protected AtomicBoolean |
aborted
Deprecated.
|
private int |
attempt
Deprecated.
|
private RegionInfo |
regionInfo
Deprecated.
|
private org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.RegionTransitionState |
transitionState
Deprecated.
|
NO_PROC_ID, NO_TIMEOUT
Constructor and Description |
---|
RegionTransitionProcedure()
Deprecated.
|
RegionTransitionProcedure(RegionInfo regionInfo)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected 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[] |
execute(MasterProcedureEnv env)
Deprecated.
The main code of the procedure.
|
protected abstract void |
finishTransition(MasterProcedureEnv env,
RegionStateNode regionNode)
Deprecated.
|
protected int |
getAttempt()
Deprecated.
|
String |
getProcName()
Deprecated.
|
RegionInfo |
getRegionInfo()
Deprecated.
|
RegionStateNode |
getRegionState(MasterProcedureEnv env)
Deprecated.
|
TableName |
getTableName()
Deprecated.
Returns the name of the table the procedure is operating on
|
(package private) org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.RegionTransitionState |
getTransitionState()
Deprecated.
|
boolean |
isMeta()
Deprecated.
|
protected abstract boolean |
isRollbackSupported(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.RegionTransitionState state)
Deprecated.
|
abstract Optional<RemoteProcedureDispatcher.RemoteOperation> |
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 |
remoteOperationCompleted(MasterProcedureEnv env)
Deprecated.
Called when RS tells the remote procedure is succeeded through the
reportProcedureDone method. |
void |
remoteOperationFailed(MasterProcedureEnv env,
RemoteProcedureException error)
Deprecated.
Called when RS tells the remote procedure is failed through the
reportProcedureDone
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 |
rollback(MasterProcedureEnv env)
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 |
toStringClassDetails(StringBuilder sb)
Deprecated.
Extend the toString() information with the procedure details e.g.
|
protected void |
toStringState(StringBuilder builder)
Deprecated.
Called from
Procedure.toString() when interpolating Procedure State. |
protected abstract boolean |
updateTransition(MasterProcedureEnv env,
RegionStateNode regionNode)
Deprecated.
|
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, isRunnable, isSuccess, isWaiting, isYieldAfterExecutionStep, releaseLock, removeStackIndex, serializeStateData, 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, waitInitialized, wasExecuted
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getTableOperationType
storeInDispatchedQueue
protected final AtomicBoolean aborted
private org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.RegionTransitionState transitionState
private RegionInfo regionInfo
private int attempt
public RegionTransitionProcedure()
public RegionTransitionProcedure(RegionInfo regionInfo)
public RegionInfo getRegionInfo()
public void setRegionInfo(RegionInfo regionInfo)
protected void setAttempt(int attempt)
protected int getAttempt()
public TableName getTableName()
TableProcedureInterface
getTableName
in interface TableProcedureInterface
public boolean isMeta()
public void toStringClassDetails(StringBuilder sb)
Procedure
toStringClassDetails
in class Procedure<MasterProcedureEnv>
sb
- the string builder to use to append the proc specific informationpublic String getProcName()
getProcName
in class Procedure<MasterProcedureEnv>
public RegionStateNode getRegionState(MasterProcedureEnv env)
void setTransitionState(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.RegionTransitionState state)
org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.RegionTransitionState getTransitionState()
protected abstract boolean startTransition(MasterProcedureEnv env, RegionStateNode regionNode) throws IOException, ProcedureSuspendedException
protected abstract boolean updateTransition(MasterProcedureEnv env, RegionStateNode regionNode) throws IOException, ProcedureSuspendedException
protected abstract void finishTransition(MasterProcedureEnv env, RegionStateNode regionNode) throws IOException, ProcedureSuspendedException
protected abstract void reportTransition(MasterProcedureEnv env, RegionStateNode regionNode, org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.RegionStateTransition.TransitionCode code, long seqId) throws UnexpectedStateException
UnexpectedStateException
public abstract Optional<RemoteProcedureDispatcher.RemoteOperation> remoteCallBuild(MasterProcedureEnv env, ServerName serverName)
RemoteProcedureDispatcher.RemoteProcedure
remoteCallBuild
in interface RemoteProcedureDispatcher.RemoteProcedure<MasterProcedureEnv,ServerName>
protected abstract boolean remoteCallFailed(MasterProcedureEnv env, RegionStateNode regionNode, IOException exception)
public void remoteCallFailed(MasterProcedureEnv env, ServerName serverName, IOException exception)
RemoteProcedureDispatcher.RemoteProcedure
remoteCallFailed
in interface RemoteProcedureDispatcher.RemoteProcedure<MasterProcedureEnv,ServerName>
protected void toStringState(StringBuilder builder)
Procedure
Procedure.toString()
when interpolating Procedure
State. Allows decorating
generic Procedure State with Procedure particulars.toStringState
in class Procedure<MasterProcedureEnv>
builder
- Append current ProcedureProtos.ProcedureState
protected Procedure[] execute(MasterProcedureEnv env)
Procedure
execute
in class Procedure<MasterProcedureEnv>
env
- the environment passed to the ProcedureExecutorprotected void rollback(MasterProcedureEnv env)
Procedure
rollback
in class Procedure<MasterProcedureEnv>
env
- the environment passed to the ProcedureExecutorprotected abstract boolean isRollbackSupported(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.RegionTransitionState state)
protected boolean abort(MasterProcedureEnv env)
Procedure
NOTE: abort() is not like Thread.interrupt(). It is just a notification that allows the procedure implementor abort.
abort
in class Procedure<MasterProcedureEnv>
public void remoteOperationCompleted(MasterProcedureEnv env)
RemoteProcedureDispatcher.RemoteProcedure
reportProcedureDone
method.remoteOperationCompleted
in interface RemoteProcedureDispatcher.RemoteProcedure<MasterProcedureEnv,ServerName>
public void remoteOperationFailed(MasterProcedureEnv env, RemoteProcedureException error)
RemoteProcedureDispatcher.RemoteProcedure
reportProcedureDone
method.remoteOperationFailed
in interface RemoteProcedureDispatcher.RemoteProcedure<MasterProcedureEnv,ServerName>
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.