Package org.apache.hadoop.hbase.master
Class TestSplitWALManager.FakeServerProcedure
java.lang.Object
org.apache.hadoop.hbase.procedure2.Procedure<TEnvironment>
org.apache.hadoop.hbase.procedure2.StateMachineProcedure<org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv,org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.SplitWALState>
org.apache.hadoop.hbase.master.TestSplitWALManager.FakeServerProcedure
- All Implemented Interfaces:
Comparable<org.apache.hadoop.hbase.procedure2.Procedure<org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv>>
,org.apache.hadoop.hbase.master.procedure.ServerProcedureInterface
- Enclosing class:
- TestSplitWALManager
public static final class TestSplitWALManager.FakeServerProcedure
extends org.apache.hadoop.hbase.procedure2.StateMachineProcedure<org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv,org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.SplitWALState>
implements org.apache.hadoop.hbase.master.procedure.ServerProcedureInterface
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.procedure2.StateMachineProcedure
org.apache.hadoop.hbase.procedure2.StateMachineProcedure.Flow
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.procedure2.Procedure
org.apache.hadoop.hbase.procedure2.Procedure.LockState
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.master.procedure.ServerProcedureInterface
org.apache.hadoop.hbase.master.procedure.ServerProcedureInterface.ServerOperationType
-
Field Summary
Modifier and TypeFieldDescriptionprivate CountDownLatch
private org.apache.hadoop.hbase.ServerName
private boolean
private org.apache.hadoop.hbase.ServerName
Fields inherited from class org.apache.hadoop.hbase.procedure2.StateMachineProcedure
stateCount
Fields inherited from class org.apache.hadoop.hbase.procedure2.Procedure
NO_PROC_ID, NO_TIMEOUT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
abort
(org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv env) void
protected void
deserializeStateData
(org.apache.hadoop.hbase.procedure2.ProcedureStateSerializer serializer) protected org.apache.hadoop.hbase.procedure2.StateMachineProcedure.Flow
executeFromState
(org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv env, org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.SplitWALState state) protected org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.SplitWALState
org.apache.hadoop.hbase.ServerName
org.apache.hadoop.hbase.master.procedure.ServerProcedureInterface.ServerOperationType
protected org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.SplitWALState
getState
(int stateId) protected int
getStateId
(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.SplitWALState state) boolean
protected boolean
holdLock
(org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv env) boolean
boolean
protected void
rollback
(org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv env) protected void
rollbackState
(org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv env, org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.SplitWALState state) protected void
serializeStateData
(org.apache.hadoop.hbase.procedure2.ProcedureStateSerializer serializer) Methods inherited from class org.apache.hadoop.hbase.procedure2.StateMachineProcedure
addChildProcedure, execute, failIfAborted, getCurrentState, getCurrentStateId, getCycles, isEofState, isRollbackSupported, isRollbackSupported, isYieldAfterExecutionStep, isYieldBeforeExecuteFromState, setNextState, toStringState
Methods inherited from class org.apache.hadoop.hbase.procedure2.Procedure
acquireLock, addStackIndex, afterReplay, beforeReplay, bypass, compareTo, completionCleanup, doExecute, doRollback, elapsedTime, getChildrenLatch, getException, getLastUpdate, getNonceKey, getOwner, getParentProcId, getProcedureMetrics, getProcId, getProcIdHashCode, getProcName, getResult, getRootProcedureId, getRootProcId, getStackIndexes, getState, getSubmittedTime, getTimeout, getTimeoutTimestamp, hasChildren, hasException, hasLock, hasOwner, hasParent, hasTimeout, haveSameParent, incChildrenLatch, isBypass, isFailed, isFinished, isInitializing, isLockedWhenLoading, isRunnable, isSuccess, isWaiting, releaseLock, removeStackIndex, setAbortFailure, setChildrenLatch, setExecuted, setFailure, setFailure, setLastUpdate, setNonceKey, setOwner, setOwner, setParentProcId, setProcId, setResult, setRootProcId, setStackIndexes, setState, setSubmittedTime, setTimeout, setTimeoutFailure, shouldWaitClientAck, skipPersistence, suspend, toString, toStringClass, toStringClassDetails, toStringDetails, toStringSimpleSB, updateMetricsOnFinish, updateMetricsOnSubmit, updateTimestamp, waitInitialized, wasExecuted
-
Field Details
-
serverName
-
worker
-
barrier
-
triedToAcquire
-
-
Constructor Details
-
FakeServerProcedure
public FakeServerProcedure() -
FakeServerProcedure
-
-
Method Details
-
getServerName
- Specified by:
getServerName
in interfaceorg.apache.hadoop.hbase.master.procedure.ServerProcedureInterface
-
hasMetaTableRegion
- Specified by:
hasMetaTableRegion
in interfaceorg.apache.hadoop.hbase.master.procedure.ServerProcedureInterface
-
getServerOperationType
public org.apache.hadoop.hbase.master.procedure.ServerProcedureInterface.ServerOperationType getServerOperationType()- Specified by:
getServerOperationType
in interfaceorg.apache.hadoop.hbase.master.procedure.ServerProcedureInterface
-
executeFromState
protected org.apache.hadoop.hbase.procedure2.StateMachineProcedure.Flow executeFromState(org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv env, org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.SplitWALState state) throws org.apache.hadoop.hbase.procedure2.ProcedureSuspendedException, org.apache.hadoop.hbase.procedure2.ProcedureYieldException, InterruptedException - Specified by:
executeFromState
in classorg.apache.hadoop.hbase.procedure2.StateMachineProcedure<org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv,
org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.SplitWALState> - Throws:
org.apache.hadoop.hbase.procedure2.ProcedureSuspendedException
org.apache.hadoop.hbase.procedure2.ProcedureYieldException
InterruptedException
-
isWorkerAcquired
-
isTriedToAcquire
-
countDown
-
rollbackState
protected void rollbackState(org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv env, org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.SplitWALState state) throws IOException, InterruptedException - Specified by:
rollbackState
in classorg.apache.hadoop.hbase.procedure2.StateMachineProcedure<org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv,
org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.SplitWALState> - Throws:
IOException
InterruptedException
-
getState
protected org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.SplitWALState getState(int stateId) - Specified by:
getState
in classorg.apache.hadoop.hbase.procedure2.StateMachineProcedure<org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv,
org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.SplitWALState>
-
getStateId
protected int getStateId(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.SplitWALState state) - Specified by:
getStateId
in classorg.apache.hadoop.hbase.procedure2.StateMachineProcedure<org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv,
org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.SplitWALState>
-
getInitialState
protected org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.SplitWALState getInitialState()- Specified by:
getInitialState
in classorg.apache.hadoop.hbase.procedure2.StateMachineProcedure<org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv,
org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.SplitWALState>
-
holdLock
- Overrides:
holdLock
in classorg.apache.hadoop.hbase.procedure2.Procedure<org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv>
-
rollback
protected void rollback(org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv env) throws IOException, InterruptedException - Overrides:
rollback
in classorg.apache.hadoop.hbase.procedure2.StateMachineProcedure<org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv,
org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.SplitWALState> - Throws:
IOException
InterruptedException
-
abort
- Overrides:
abort
in classorg.apache.hadoop.hbase.procedure2.StateMachineProcedure<org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv,
org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.SplitWALState>
-
serializeStateData
protected void serializeStateData(org.apache.hadoop.hbase.procedure2.ProcedureStateSerializer serializer) throws IOException - Overrides:
serializeStateData
in classorg.apache.hadoop.hbase.procedure2.StateMachineProcedure<org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv,
org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.SplitWALState> - Throws:
IOException
-
deserializeStateData
protected void deserializeStateData(org.apache.hadoop.hbase.procedure2.ProcedureStateSerializer serializer) throws IOException - Overrides:
deserializeStateData
in classorg.apache.hadoop.hbase.procedure2.StateMachineProcedure<org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv,
org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.SplitWALState> - Throws:
IOException
-