类 RegionMigrateProcedure
- java.lang.Object
-
- org.apache.iotdb.confignode.procedure.Procedure<Env>
-
- org.apache.iotdb.confignode.procedure.impl.statemachine.StateMachineProcedure<ConfigNodeProcedureEnv,RegionTransitionState>
-
- org.apache.iotdb.confignode.procedure.impl.statemachine.RegionMigrateProcedure
-
- 所有已实现的接口:
java.lang.Comparable<Procedure<ConfigNodeProcedureEnv>>
public class RegionMigrateProcedure extends StateMachineProcedure<ConfigNodeProcedureEnv,RegionTransitionState>
region migrate procedure
-
-
嵌套类概要
-
从类继承的嵌套类/接口 org.apache.iotdb.confignode.procedure.impl.statemachine.StateMachineProcedure
StateMachineProcedure.Flow
-
-
字段概要
-
从类继承的字段 org.apache.iotdb.confignode.procedure.impl.statemachine.StateMachineProcedure
stateCount
-
从类继承的字段 org.apache.iotdb.confignode.procedure.Procedure
NO_PROC_ID, NO_TIMEOUT
-
-
构造器概要
构造器 构造器 说明 RegionMigrateProcedure()RegionMigrateProcedure(org.apache.iotdb.common.rpc.thrift.TConsensusGroupId consensusGroupId, org.apache.iotdb.common.rpc.thrift.TDataNodeLocation originalDataNode, org.apache.iotdb.common.rpc.thrift.TDataNodeLocation destDataNode)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected ProcedureLockStateacquireLock(ConfigNodeProcedureEnv configNodeProcedureEnv)Acquire a lock, user should override it if necessary.voiddeserialize(java.nio.ByteBuffer byteBuffer)booleanequals(java.lang.Object that)protected StateMachineProcedure.FlowexecuteFromState(ConfigNodeProcedureEnv env, RegionTransitionState state)called to perform a single step of the specified 'state' of the procedureorg.apache.iotdb.common.rpc.thrift.TConsensusGroupIdgetConsensusGroupId()protected RegionTransitionStategetInitialState()Return the initial state object that will be used for the first call to executeFromState().protected RegionTransitionStategetState(int stateId)Convert an ordinal (or state id) to an Enum (or more descriptive) state object.protected intgetStateId(RegionTransitionState regionTransitionState)Convert the Enum (or more descriptive) state object to an ordinal (or state id).protected booleanisRollbackSupported(RegionTransitionState state)Used by the default implementation of abort() to know if the current state can be aborted and rollback can be triggered.voidnotifyTheRegionMigrateFinished(org.apache.iotdb.confignode.rpc.thrift.TRegionMigrateResultReportReq req)DataNode report region migrate result to ConfigNode, and continueprotected voidreleaseLock(ConfigNodeProcedureEnv configNodeProcedureEnv)Release a lock, user should override it if necessary.protected voidrollbackState(ConfigNodeProcedureEnv env, RegionTransitionState state)called to perform the rollback of the specified statevoidserialize(java.io.DataOutputStream stream)org.apache.iotdb.common.rpc.thrift.TSStatuswaitForOneMigrationStepFinished(org.apache.iotdb.common.rpc.thrift.TConsensusGroupId consensusGroupId, RegionTransitionState state)-
从类继承的方法 org.apache.iotdb.confignode.procedure.impl.statemachine.StateMachineProcedure
abort, addChildProcedure, execute, failIfAborted, getCurrentState, getCurrentStateId, getCycles, isEofState, isYieldAfterExecution, isYieldBeforeExecuteFromState, rollback, setNextState, toStringState
-
从类继承的方法 org.apache.iotdb.confignode.procedure.Procedure
addStackIndex, afterRecover, beforeRecover, compareTo, completionCleanup, deserializeTypeInfo, doAcquireLock, doExecute, doReleaseLock, doRollback, elapsedTime, getChildrenLatch, getException, getLastUpdate, getParentProcId, getProcId, getProcName, getResult, getRootProcedureId, getRootProcId, getStackIndexes, getState, getSubmittedTime, getTimeout, getTimeoutTimestamp, hasChildren, hasException, hasLock, hasParent, hasTimeout, haveSameParent, holdLock, incChildrenLatch, isFailed, isFinished, isInitializing, isLockedWhenLoading, isRunnable, isSuccess, isWaiting, needPersistance, newInstance, removeStackIndex, resetPersistance, restoreLock, setAbortFailure, setChildrenLatch, setFailure, setFailure, setLastUpdate, setParentProcId, setProcId, setProcRunnable, setResult, setRootProcedureId, setRootProcId, setStackIndexes, setState, setSubmittedTime, setTimeout, setTimeoutFailure, skipPersistance, toString, toStringClass, toStringClassDetails, toStringDetails, toStringSimpleSB, updateTimestamp, waitInitialized, wasExecuted
-
-
-
-
构造器详细资料
-
RegionMigrateProcedure
public RegionMigrateProcedure()
-
RegionMigrateProcedure
public RegionMigrateProcedure(org.apache.iotdb.common.rpc.thrift.TConsensusGroupId consensusGroupId, org.apache.iotdb.common.rpc.thrift.TDataNodeLocation originalDataNode, org.apache.iotdb.common.rpc.thrift.TDataNodeLocation destDataNode)
-
-
方法详细资料
-
executeFromState
protected StateMachineProcedure.Flow executeFromState(ConfigNodeProcedureEnv env, RegionTransitionState state)
从类复制的说明:StateMachineProcedurecalled to perform a single step of the specified 'state' of the procedure- 指定者:
executeFromState在类中StateMachineProcedure<ConfigNodeProcedureEnv,RegionTransitionState>state- state to execute- 返回:
- Flow.NO_MORE_STATE if the procedure is completed, Flow.HAS_MORE_STATE if there is another step.
-
rollbackState
protected void rollbackState(ConfigNodeProcedureEnv env, RegionTransitionState state) throws java.io.IOException, java.lang.InterruptedException, ProcedureException
从类复制的说明:StateMachineProcedurecalled to perform the rollback of the specified state- 指定者:
rollbackState在类中StateMachineProcedure<ConfigNodeProcedureEnv,RegionTransitionState>state- state to rollback- 抛出:
java.io.IOException- temporary failure, the rollback will retry laterjava.lang.InterruptedExceptionProcedureException
-
isRollbackSupported
protected boolean isRollbackSupported(RegionTransitionState state)
从类复制的说明:StateMachineProcedureUsed by the default implementation of abort() to know if the current state can be aborted and rollback can be triggered.
-
acquireLock
protected ProcedureLockState acquireLock(ConfigNodeProcedureEnv configNodeProcedureEnv)
从类复制的说明:ProcedureAcquire a lock, user should override it if necessary.- 覆盖:
acquireLock在类中Procedure<ConfigNodeProcedureEnv>- 参数:
configNodeProcedureEnv- environment- 返回:
- state of lock
-
releaseLock
protected void releaseLock(ConfigNodeProcedureEnv configNodeProcedureEnv)
从类复制的说明:ProcedureRelease a lock, user should override it if necessary.- 覆盖:
releaseLock在类中Procedure<ConfigNodeProcedureEnv>- 参数:
configNodeProcedureEnv- env
-
getState
protected RegionTransitionState getState(int stateId)
从类复制的说明:StateMachineProcedureConvert an ordinal (or state id) to an Enum (or more descriptive) state object.- 指定者:
getState在类中StateMachineProcedure<ConfigNodeProcedureEnv,RegionTransitionState>- 参数:
stateId- the ordinal() of the state enum (or state id)- 返回:
- the state enum object
-
getStateId
protected int getStateId(RegionTransitionState regionTransitionState)
从类复制的说明:StateMachineProcedureConvert the Enum (or more descriptive) state object to an ordinal (or state id).- 指定者:
getStateId在类中StateMachineProcedure<ConfigNodeProcedureEnv,RegionTransitionState>- 参数:
regionTransitionState- the state enum object- 返回:
- stateId the ordinal() of the state enum (or state id)
-
getInitialState
protected RegionTransitionState getInitialState()
从类复制的说明:StateMachineProcedureReturn the initial state object that will be used for the first call to executeFromState().- 指定者:
getInitialState在类中StateMachineProcedure<ConfigNodeProcedureEnv,RegionTransitionState>- 返回:
- the initial state enum object
-
serialize
public void serialize(java.io.DataOutputStream stream) throws java.io.IOException- 覆盖:
serialize在类中StateMachineProcedure<ConfigNodeProcedureEnv,RegionTransitionState>- 抛出:
java.io.IOException
-
deserialize
public void deserialize(java.nio.ByteBuffer byteBuffer)
-
equals
public boolean equals(java.lang.Object that)
- 覆盖:
equals在类中java.lang.Object
-
waitForOneMigrationStepFinished
public org.apache.iotdb.common.rpc.thrift.TSStatus waitForOneMigrationStepFinished(org.apache.iotdb.common.rpc.thrift.TConsensusGroupId consensusGroupId, RegionTransitionState state) throws java.lang.Exception- 抛出:
java.lang.Exception
-
notifyTheRegionMigrateFinished
public void notifyTheRegionMigrateFinished(org.apache.iotdb.confignode.rpc.thrift.TRegionMigrateResultReportReq req)
DataNode report region migrate result to ConfigNode, and continue
-
getConsensusGroupId
public org.apache.iotdb.common.rpc.thrift.TConsensusGroupId getConsensusGroupId()
-
-