Class TestProcedureEvents.TestTimeoutEventProcedure
java.lang.Object
org.apache.hadoop.hbase.procedure2.Procedure<TEnv>
org.apache.hadoop.hbase.procedure2.ProcedureTestingUtility.NoopProcedure<TestProcedureEvents.TestProcEnv>
org.apache.hadoop.hbase.procedure2.TestProcedureEvents.TestTimeoutEventProcedure
- All Implemented Interfaces:
Comparable<org.apache.hadoop.hbase.procedure2.Procedure<TestProcedureEvents.TestProcEnv>>
- Enclosing class:
- TestProcedureEvents
public static class TestProcedureEvents.TestTimeoutEventProcedure
extends ProcedureTestingUtility.NoopProcedure<TestProcedureEvents.TestProcEnv>
This Event+Procedure exhibits following behavior:
- On procedure execute()
- If had enough timeouts, abort the procedure. Else....
- Suspend the event and add self to its suspend queue
- Go into waiting state
- On waiting timeout
- Wake the event (which adds this procedure back into scheduler queue), and set own's state to RUNNABLE (so can be executed again).
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.procedure2.Procedure
org.apache.hadoop.hbase.procedure2.Procedure.LockState
-
Field Summary
Modifier and TypeFieldDescriptionprivate final org.apache.hadoop.hbase.procedure2.ProcedureEvent
private int
private final AtomicInteger
Fields inherited from class org.apache.hadoop.hbase.procedure2.Procedure
NO_PROC_ID, NO_TIMEOUT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
deserializeStateData
(org.apache.hadoop.hbase.procedure2.ProcedureStateSerializer serializer) protected org.apache.hadoop.hbase.procedure2.Procedure[]
int
protected void
serializeStateData
(org.apache.hadoop.hbase.procedure2.ProcedureStateSerializer serializer) protected boolean
Methods inherited from class org.apache.hadoop.hbase.procedure2.ProcedureTestingUtility.NoopProcedure
abort, rollback
Methods inherited from class org.apache.hadoop.hbase.procedure2.Procedure
acquireLock, addStackIndex, beforeReplay, bypass, compareTo, completionCleanup, doAcquireLock, doExecute, doReleaseLock, 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, holdLock, incChildrenLatch, isBypass, isFailed, isFinished, isInitializing, isLockedWhenLoading, isRollbackSupported, isRunnable, isSuccess, isWaiting, isYieldAfterExecutionStep, lockedWhenLoading, needPersistence, releaseLock, removeStackIndex, resetPersistence, restoreLock, setAbortFailure, setChildrenLatch, setExecuted, setFailure, setFailure, setLastUpdate, setNonceKey, setOwner, setOwner, setParentProcId, setProcId, setResult, setRootProcId, setStackIndexes, setState, setSubmittedTime, setTimeout, shouldWaitClientAck, skipPersistence, suspend, toString, toStringClass, toStringClassDetails, toStringDetails, toStringSimpleSB, toStringState, tryRunnable, updateMetricsOnFinish, updateMetricsOnSubmit, updateTimestamp, waitInitialized, wasExecuted
-
Field Details
-
event
-
ntimeouts
-
maxTimeouts
-
-
Constructor Details
-
TestTimeoutEventProcedure
public TestTimeoutEventProcedure() -
TestTimeoutEventProcedure
-
-
Method Details
-
getTimeoutsCount
-
execute
protected org.apache.hadoop.hbase.procedure2.Procedure[] execute(TestProcedureEvents.TestProcEnv env) throws org.apache.hadoop.hbase.procedure2.ProcedureSuspendedException - Overrides:
execute
in classProcedureTestingUtility.NoopProcedure<TestProcedureEvents.TestProcEnv>
- Throws:
org.apache.hadoop.hbase.procedure2.ProcedureSuspendedException
-
setTimeoutFailure
- Overrides:
setTimeoutFailure
in classorg.apache.hadoop.hbase.procedure2.Procedure<TestProcedureEvents.TestProcEnv>
-
afterReplay
- Overrides:
afterReplay
in classorg.apache.hadoop.hbase.procedure2.Procedure<TestProcedureEvents.TestProcEnv>
-
serializeStateData
protected void serializeStateData(org.apache.hadoop.hbase.procedure2.ProcedureStateSerializer serializer) throws IOException - Overrides:
serializeStateData
in classProcedureTestingUtility.NoopProcedure<TestProcedureEvents.TestProcEnv>
- Throws:
IOException
-
deserializeStateData
protected void deserializeStateData(org.apache.hadoop.hbase.procedure2.ProcedureStateSerializer serializer) throws IOException - Overrides:
deserializeStateData
in classProcedureTestingUtility.NoopProcedure<TestProcedureEvents.TestProcEnv>
- Throws:
IOException
-