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
Modifier and TypeClassDescriptionprivate class
Just tell the current coordinator that each of the nodes has preparedprivate class
Just tell the current coordinator that each of the nodes has committedprivate static class
-
Field Summary
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
private final org.apache.hadoop.hbase.procedure.ProcedureCoordinatorRpcs
private org.apache.hadoop.hbase.procedure.ProcedureCoordinator
private final org.apache.hadoop.hbase.errorhandling.ForeignExceptionDispatcher
private static final String
private static final long
private static final byte[]
private static final String
private final org.apache.hadoop.hbase.procedure.Procedure
private static final long
private static final long
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate org.apache.hadoop.hbase.procedure.ProcedureCoordinator
void
void
runCoordinatedOperation
(org.apache.hadoop.hbase.procedure.Procedure spy, TestProcedureCoordinator.AcquireBarrierAnswer prepare, String... cohort) void
runCoordinatedOperation
(org.apache.hadoop.hbase.procedure.Procedure spy, TestProcedureCoordinator.AcquireBarrierAnswer prepareOperation, TestProcedureCoordinator.BarrierAnswer commitOperation, String... cohort) void
runCoordinatedOperation
(org.apache.hadoop.hbase.procedure.Procedure spy, TestProcedureCoordinator.BarrierAnswer commit, String... cohort) void
runCoordinatedProcedure
(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).void
runSimpleProcedure
(String... members) void
Test that if nodes join the barrier early we still correctly handle the progressvoid
void
void
void
Currently we can only handle one procedure at a time.void
Check handling a connection failure correctly if we get it during the barrier phasevoid
Check 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 realProcedure
cohort
- 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
-