Search in sources :

Example 1 with HBaseCommonTestingUtility

use of org.apache.hadoop.hbase.HBaseCommonTestingUtility in project hbase by apache.

the class TestProcedureRecovery method setUp.

@Before
public void setUp() throws IOException {
    htu = new HBaseCommonTestingUtility();
    testDir = htu.getDataTestDir();
    fs = testDir.getFileSystem(htu.getConfiguration());
    assertTrue(testDir.depth() > 1);
    logDir = new Path(testDir, "proc-logs");
    procEnv = new TestProcEnv();
    procStore = ProcedureTestingUtility.createStore(htu.getConfiguration(), fs, logDir);
    procExecutor = new ProcedureExecutor(htu.getConfiguration(), procEnv, procStore);
    procExecutor.testing = new ProcedureExecutor.Testing();
    procStore.start(PROCEDURE_EXECUTOR_SLOTS);
    procExecutor.start(PROCEDURE_EXECUTOR_SLOTS, true);
    procSleepInterval = 0;
}
Also used : Path(org.apache.hadoop.fs.Path) HBaseCommonTestingUtility(org.apache.hadoop.hbase.HBaseCommonTestingUtility) Before(org.junit.Before)

Example 2 with HBaseCommonTestingUtility

use of org.apache.hadoop.hbase.HBaseCommonTestingUtility in project hbase by apache.

the class TestProcedureReplayOrder method setUp.

@Before
public void setUp() throws IOException {
    htu = new HBaseCommonTestingUtility();
    htu.getConfiguration().setInt(WALProcedureStore.SYNC_WAIT_MSEC_CONF_KEY, 25);
    testDir = htu.getDataTestDir();
    fs = testDir.getFileSystem(htu.getConfiguration());
    assertTrue(testDir.depth() > 1);
    logDir = new Path(testDir, "proc-logs");
    procEnv = new TestProcedureEnv();
    procStore = ProcedureTestingUtility.createWalStore(htu.getConfiguration(), fs, logDir);
    procExecutor = new ProcedureExecutor(htu.getConfiguration(), procEnv, procStore);
    procStore.start(NUM_THREADS);
    procExecutor.start(1, true);
}
Also used : Path(org.apache.hadoop.fs.Path) HBaseCommonTestingUtility(org.apache.hadoop.hbase.HBaseCommonTestingUtility) Before(org.junit.Before)

Example 3 with HBaseCommonTestingUtility

use of org.apache.hadoop.hbase.HBaseCommonTestingUtility 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 4 with HBaseCommonTestingUtility

use of org.apache.hadoop.hbase.HBaseCommonTestingUtility in project hbase by apache.

the class TestWALProcedureStore method setUp.

@Before
public void setUp() throws IOException {
    htu = new HBaseCommonTestingUtility();
    testDir = htu.getDataTestDir();
    fs = testDir.getFileSystem(htu.getConfiguration());
    assertTrue(testDir.depth() > 1);
    setupConfig(htu.getConfiguration());
    logDir = new Path(testDir, "proc-logs");
    procStore = ProcedureTestingUtility.createWalStore(htu.getConfiguration(), fs, logDir);
    procStore.start(PROCEDURE_STORE_SLOTS);
    procStore.recoverLease();
    procStore.load(new LoadCounter());
}
Also used : Path(org.apache.hadoop.fs.Path) LoadCounter(org.apache.hadoop.hbase.procedure2.ProcedureTestingUtility.LoadCounter) HBaseCommonTestingUtility(org.apache.hadoop.hbase.HBaseCommonTestingUtility) Before(org.junit.Before)

Example 5 with HBaseCommonTestingUtility

use of org.apache.hadoop.hbase.HBaseCommonTestingUtility in project hbase by apache.

the class TestProcedureExecution method setUp.

@Before
public void setUp() throws IOException {
    htu = new HBaseCommonTestingUtility();
    testDir = htu.getDataTestDir();
    fs = testDir.getFileSystem(htu.getConfiguration());
    assertTrue(testDir.depth() > 1);
    logDir = new Path(testDir, "proc-logs");
    procStore = ProcedureTestingUtility.createWalStore(htu.getConfiguration(), fs, logDir);
    procExecutor = new ProcedureExecutor(htu.getConfiguration(), null, procStore);
    procStore.start(PROCEDURE_EXECUTOR_SLOTS);
    procExecutor.start(PROCEDURE_EXECUTOR_SLOTS, true);
}
Also used : Path(org.apache.hadoop.fs.Path) HBaseCommonTestingUtility(org.apache.hadoop.hbase.HBaseCommonTestingUtility) Before(org.junit.Before)

Aggregations

HBaseCommonTestingUtility (org.apache.hadoop.hbase.HBaseCommonTestingUtility)13 Before (org.junit.Before)13 Path (org.apache.hadoop.fs.Path)10 NoopProcedureStore (org.apache.hadoop.hbase.procedure2.store.NoopProcedureStore)3 LoadCounter (org.apache.hadoop.hbase.procedure2.ProcedureTestingUtility.LoadCounter)2