public class TestProcedureEvents extends Object
Modifier and Type | Class and Description |
---|---|
private class |
TestProcedureEvents.TestProcEnv |
static class |
TestProcedureEvents.TestTimeoutEventProcedure
This Event+Procedure exhibits following behavior:
On procedure execute()
If had enough timeouts, abort the procedure.
|
Modifier and Type | Field and Description |
---|---|
static HBaseClassTestRule |
CLASS_RULE |
private org.apache.hadoop.fs.FileSystem |
fs |
private HBaseCommonTestingUtility |
htu |
private static org.slf4j.Logger |
LOG |
private org.apache.hadoop.fs.Path |
logDir |
private TestProcedureEvents.TestProcEnv |
procEnv |
private org.apache.hadoop.hbase.procedure2.ProcedureExecutor<TestProcedureEvents.TestProcEnv> |
procExecutor |
private org.apache.hadoop.hbase.procedure2.store.ProcedureStore |
procStore |
Constructor and Description |
---|
TestProcedureEvents() |
Modifier and Type | Method and Description |
---|---|
void |
setUp() |
void |
tearDown() |
void |
testTimeoutEventProcedure()
Tests being able to suspend a Procedure for N timeouts and then failing.s
Resets the timeout after each elapses.
|
void |
testTimeoutEventProcedureDoubleExecution() |
private void |
testTimeoutEventProcedureDoubleExecution(boolean killIfSuspended) |
void |
testTimeoutEventProcedureDoubleExecutionKillIfSuspended() |
public static final HBaseClassTestRule CLASS_RULE
private static final org.slf4j.Logger LOG
private TestProcedureEvents.TestProcEnv procEnv
private org.apache.hadoop.hbase.procedure2.store.ProcedureStore procStore
private org.apache.hadoop.hbase.procedure2.ProcedureExecutor<TestProcedureEvents.TestProcEnv> procExecutor
private HBaseCommonTestingUtility htu
private org.apache.hadoop.fs.FileSystem fs
private org.apache.hadoop.fs.Path logDir
public TestProcedureEvents()
public void setUp() throws IOException
IOException
public void tearDown() throws IOException
IOException
public void testTimeoutEventProcedure() throws Exception
TestProcedureEvents.TestTimeoutEventProcedure
for example
of how to do this sort of trickery with the ProcedureExecutor; i.e. suspend for a while,
check for a condition and if not set, suspend again, etc., ultimately failing or succeeding
eventually.Exception
public void testTimeoutEventProcedureDoubleExecution() throws Exception
Exception
public void testTimeoutEventProcedureDoubleExecutionKillIfSuspended() throws Exception
Exception
private void testTimeoutEventProcedureDoubleExecution(boolean killIfSuspended) throws Exception
Exception
Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.