Class OpenRegionProcedure
java.lang.Object
org.apache.hadoop.hbase.procedure2.Procedure<MasterProcedureEnv>
org.apache.hadoop.hbase.master.assignment.RegionRemoteProcedureBase
org.apache.hadoop.hbase.master.assignment.OpenRegionProcedure
- All Implemented Interfaces:
Comparable<Procedure<MasterProcedureEnv>>
,TableProcedureInterface
,RemoteProcedureDispatcher.RemoteProcedure<MasterProcedureEnv,
ServerName>
The remote procedure used to open a region.
-
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
Fields inherited from class org.apache.hadoop.hbase.master.assignment.RegionRemoteProcedureBase
region, targetServer
Fields inherited from class org.apache.hadoop.hbase.procedure2.Procedure
NO_PROC_ID, NO_TIMEOUT
-
Constructor Summary
ConstructorDescriptionOpenRegionProcedure
(TransitRegionStateProcedure parent, RegionInfo region, ServerName targetServer) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkTransition
(RegionStateNode regionNode, org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.RegionStateTransition.TransitionCode transitionCode, long openSeqNum) protected void
deserializeStateData
(ProcedureStateSerializer serializer) Called on store load to allow the user to decode the previously serialized state.protected ProcedureMetrics
Override this method to provide procedure specific counters for submitted count, failed count and time histogram.Given an operation type we can take decisions about what to do with pending operations.private void
regionOpenedWithoutPersistingToMeta
(AssignmentManager am, RegionStateNode regionNode, org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.RegionStateTransition.TransitionCode transitionCode, long openSeqNum) protected void
restoreSucceedState
(AssignmentManager am, RegionStateNode regionNode, long openSeqNum) protected void
serializeStateData
(ProcedureStateSerializer serializer) The user-level code of the procedure may have some state to persist (e.g.protected void
updateTransitionWithoutPersistingToMeta
(MasterProcedureEnv env, RegionStateNode regionNode, org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.RegionStateTransition.TransitionCode transitionCode, long openSeqNum) Methods inherited from class org.apache.hadoop.hbase.master.assignment.RegionRemoteProcedureBase
abort, afterReplay, execute, getProcName, getTableName, remoteCallBuild, remoteCallFailed, remoteOperationCompleted, remoteOperationFailed, reportTransition, rollback, serverCrashed, setTimeoutFailure, stateLoaded, storeInDispatchedQueue, toStringClassDetails, waitInitialized
Methods inherited from class org.apache.hadoop.hbase.procedure2.Procedure
acquireLock, addStackIndex, beforeReplay, bypass, compareTo, completionCleanup, doExecute, doRollback, elapsedTime, getChildrenLatch, getException, getLastUpdate, getNonceKey, getOwner, getParentProcId, 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, setAbortFailure, setChildrenLatch, setExecuted, setFailure, setFailure, setLastUpdate, setNonceKey, setOwner, setOwner, setParentProcId, setProcId, setResult, setRootProcId, setStackIndexes, setState, setSubmittedTime, setTimeout, shouldWaitClientAck, skipPersistence, suspend, toString, toStringClass, toStringDetails, toStringSimpleSB, toStringState, updateMetricsOnFinish, updateMetricsOnSubmit, updateTimestamp, wasExecuted
-
Field Details
-
LOG
-
-
Constructor Details
-
OpenRegionProcedure
public OpenRegionProcedure() -
OpenRegionProcedure
public OpenRegionProcedure(TransitRegionStateProcedure parent, RegionInfo region, ServerName targetServer)
-
-
Method Details
-
getTableOperationType
Description copied from interface:TableProcedureInterface
Given an operation type we can take decisions about what to do with pending operations. e.g. if we get a delete and we have some table operation pending (e.g. add column) we can abort those operations.- Returns:
- the operation type that the procedure is executing.
-
newRemoteOperation
- Specified by:
newRemoteOperation
in classRegionRemoteProcedureBase
-
serializeStateData
Description copied from class:Procedure
The user-level code of the procedure may have some state to persist (e.g. input arguments or current position in the processing state) to be able to resume on failure.- Overrides:
serializeStateData
in classRegionRemoteProcedureBase
- Parameters:
serializer
- stores the serializable state- Throws:
IOException
-
deserializeStateData
Description copied from class:Procedure
Called on store load to allow the user to decode the previously serialized state.- Overrides:
deserializeStateData
in classRegionRemoteProcedureBase
- Parameters:
serializer
- contains the serialized state- Throws:
IOException
-
getProcedureMetrics
Description copied from class:Procedure
Override this method to provide procedure specific counters for submitted count, failed count and time histogram.- Overrides:
getProcedureMetrics
in classProcedure<MasterProcedureEnv>
- Parameters:
env
- The environment passed to the procedure executor- Returns:
- Container object for procedure related metric
-
regionOpenedWithoutPersistingToMeta
private void regionOpenedWithoutPersistingToMeta(AssignmentManager am, RegionStateNode regionNode, org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.RegionStateTransition.TransitionCode transitionCode, long openSeqNum) throws IOException - Throws:
IOException
-
checkTransition
protected void checkTransition(RegionStateNode regionNode, org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.RegionStateTransition.TransitionCode transitionCode, long openSeqNum) throws UnexpectedStateException - Specified by:
checkTransition
in classRegionRemoteProcedureBase
- Throws:
UnexpectedStateException
-
updateTransitionWithoutPersistingToMeta
protected void updateTransitionWithoutPersistingToMeta(MasterProcedureEnv env, RegionStateNode regionNode, org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.RegionStateTransition.TransitionCode transitionCode, long openSeqNum) throws IOException - Specified by:
updateTransitionWithoutPersistingToMeta
in classRegionRemoteProcedureBase
- Throws:
IOException
-
restoreSucceedState
protected void restoreSucceedState(AssignmentManager am, RegionStateNode regionNode, long openSeqNum) throws IOException - Specified by:
restoreSucceedState
in classRegionRemoteProcedureBase
- Throws:
IOException
-