Search in sources :

Example 1 with NoopProcedureStore

use of org.apache.hadoop.hbase.procedure2.store.NoopProcedureStore in project hbase by apache.

the class TestProcedureExecutor method setUp.

@Before
public void setUp() throws Exception {
    htu = new HBaseCommonTestingUtility();
    // NOTE: The executor will be created by each test
    procEnv = new TestProcEnv();
    procStore = new NoopProcedureStore();
    procStore.start(1);
}
Also used : HBaseCommonTestingUtility(org.apache.hadoop.hbase.HBaseCommonTestingUtility) NoopProcedureStore(org.apache.hadoop.hbase.procedure2.store.NoopProcedureStore) Before(org.junit.Before)

Example 2 with NoopProcedureStore

use of org.apache.hadoop.hbase.procedure2.store.NoopProcedureStore in project hbase by apache.

the class TestProcedureSuspended method setUp.

@Before
public void setUp() throws IOException {
    htu = new HBaseCommonTestingUtility();
    procStore = new NoopProcedureStore();
    procExecutor = new ProcedureExecutor(htu.getConfiguration(), new TestProcEnv(), procStore);
    procStore.start(PROCEDURE_EXECUTOR_SLOTS);
    procExecutor.start(PROCEDURE_EXECUTOR_SLOTS, true);
}
Also used : HBaseCommonTestingUtility(org.apache.hadoop.hbase.HBaseCommonTestingUtility) NoopProcedureStore(org.apache.hadoop.hbase.procedure2.store.NoopProcedureStore) Before(org.junit.Before)

Example 3 with NoopProcedureStore

use of org.apache.hadoop.hbase.procedure2.store.NoopProcedureStore in project hbase by apache.

the class TestProcedureInMemoryChore method setUp.

@Before
public void setUp() throws IOException {
    htu = new HBaseCommonTestingUtility();
    procEnv = new TestProcEnv();
    procStore = new NoopProcedureStore();
    procExecutor = new ProcedureExecutor(htu.getConfiguration(), procEnv, procStore);
    procExecutor.testing = new ProcedureExecutor.Testing();
    procStore.start(PROCEDURE_EXECUTOR_SLOTS);
    procExecutor.start(PROCEDURE_EXECUTOR_SLOTS, true);
}
Also used : HBaseCommonTestingUtility(org.apache.hadoop.hbase.HBaseCommonTestingUtility) NoopProcedureStore(org.apache.hadoop.hbase.procedure2.store.NoopProcedureStore) Before(org.junit.Before)

Example 4 with NoopProcedureStore

use of org.apache.hadoop.hbase.procedure2.store.NoopProcedureStore in project hbase by apache.

the class ProcedureTestingUtility method submitAndWait.

public static <TEnv> long submitAndWait(Configuration conf, TEnv env, Procedure<TEnv> proc) throws IOException {
    NoopProcedureStore procStore = new NoopProcedureStore();
    ProcedureExecutor<TEnv> procExecutor = new ProcedureExecutor<>(conf, env, procStore);
    procStore.start(1);
    procExecutor.start(1, false);
    try {
        return submitAndWait(procExecutor, proc, HConstants.NO_NONCE, HConstants.NO_NONCE);
    } finally {
        procStore.stop(false);
        procExecutor.stop();
    }
}
Also used : NoopProcedureStore(org.apache.hadoop.hbase.procedure2.store.NoopProcedureStore)

Aggregations

NoopProcedureStore (org.apache.hadoop.hbase.procedure2.store.NoopProcedureStore)4 HBaseCommonTestingUtility (org.apache.hadoop.hbase.HBaseCommonTestingUtility)3 Before (org.junit.Before)3