Class TestProcedureCoordinator
java.lang.Object
org.apache.hadoop.hbase.procedure.TestProcedureCoordinator
Test Procedure coordinator operation.
This only works correctly when we do class level parallelization of tests. If we do method level serialization this class will likely throw all kinds of errors.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classJust tell the current coordinator that each of the nodes has preparedprivate classJust tell the current coordinator that each of the nodes has committedprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HBaseClassTestRuleprivate final org.apache.hadoop.hbase.procedure.ProcedureCoordinatorRpcsprivate org.apache.hadoop.hbase.procedure.ProcedureCoordinatorprivate final org.apache.hadoop.hbase.errorhandling.ForeignExceptionDispatcherprivate static final Stringprivate static final longprivate static final byte[]private static final Stringprivate final org.apache.hadoop.hbase.procedure.Procedureprivate static final longprivate static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate org.apache.hadoop.hbase.procedure.ProcedureCoordinatorvoidvoidrunCoordinatedOperation(org.apache.hadoop.hbase.procedure.Procedure spy, TestProcedureCoordinator.AcquireBarrierAnswer prepare, String... cohort) voidrunCoordinatedOperation(org.apache.hadoop.hbase.procedure.Procedure spy, TestProcedureCoordinator.AcquireBarrierAnswer prepareOperation, TestProcedureCoordinator.BarrierAnswer commitOperation, String... cohort) voidrunCoordinatedOperation(org.apache.hadoop.hbase.procedure.Procedure spy, TestProcedureCoordinator.BarrierAnswer commit, String... cohort) voidrunCoordinatedProcedure(org.apache.hadoop.hbase.procedure.Procedure spy, String... cohort) Just run a procedure with the standard name and data, with not special task for the mock coordinator (it works just like a regular coordinator).voidrunSimpleProcedure(String... members) voidTest that if nodes join the barrier early we still correctly handle the progressvoidvoidvoidvoidCurrently we can only handle one procedure at a time.voidCheck handling a connection failure correctly if we get it during the barrier phasevoidCheck handling a connection failure correctly if we get it during the acquiring phase
-
Field Details
-
CLASS_RULE
-
WAKE_FREQUENCY
- See Also:
-
TIMEOUT
- See Also:
-
POOL_KEEP_ALIVE
- See Also:
-
nodeName
- See Also:
-
procName
- See Also:
-
procData
-
expected
-
controller
-
task
-
monitor
-
coordinator
-
-
Constructor Details
-
TestProcedureCoordinator
public TestProcedureCoordinator()
-
-
Method Details
-
resetTest
- Throws:
IOException
-
buildNewCoordinator
-
testThreadPoolSize
Currently we can only handle one procedure at a time. This makes sure we handle that and reject submitting more.- Throws:
Exception
-
testUnreachableControllerDuringPrepare
Check handling a connection failure correctly if we get it during the acquiring phase- Throws:
Exception
-
testUnreachableControllerDuringCommit
Check handling a connection failure correctly if we get it during the barrier phase- Throws:
Exception
-
testNoCohort
- Throws:
Exception
-
testSingleCohortOrchestration
- Throws:
Exception
-
testMultipleCohortOrchestration
- Throws:
Exception
-
runSimpleProcedure
- Throws:
Exception
-
testEarlyJoiningBarrier
Test that if nodes join the barrier early we still correctly handle the progress- Throws:
Exception
-
runCoordinatedProcedure
public void runCoordinatedProcedure(org.apache.hadoop.hbase.procedure.Procedure spy, String... cohort) throws Exception Just run a procedure with the standard name and data, with not special task for the mock coordinator (it works just like a regular coordinator). For custom behavior seerunCoordinatedOperation(Procedure, AcquireBarrierAnswer, BarrierAnswer, String[]).- Parameters:
spy- Spy on a realProcedurecohort- expected cohort members- Throws:
Exception- on failure
-
runCoordinatedOperation
public void runCoordinatedOperation(org.apache.hadoop.hbase.procedure.Procedure spy, TestProcedureCoordinator.AcquireBarrierAnswer prepare, String... cohort) throws Exception - Throws:
Exception
-
runCoordinatedOperation
public void runCoordinatedOperation(org.apache.hadoop.hbase.procedure.Procedure spy, TestProcedureCoordinator.BarrierAnswer commit, String... cohort) throws Exception - Throws:
Exception
-
runCoordinatedOperation
public void runCoordinatedOperation(org.apache.hadoop.hbase.procedure.Procedure spy, TestProcedureCoordinator.AcquireBarrierAnswer prepareOperation, TestProcedureCoordinator.BarrierAnswer commitOperation, String... cohort) throws Exception - Throws:
Exception
-