Search in sources :

Example 6 with HBaseCommonTestingUtility

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

the class TestStressWALProcedureStore method setUp.

@Before
public void setUp() throws IOException {
    htu = new HBaseCommonTestingUtility();
    setupConfiguration(htu.getConfiguration());
    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);
    procStore.start(PROCEDURE_STORE_SLOTS);
    procStore.recoverLease();
    LoadCounter loader = new LoadCounter();
    procStore.load(loader);
    assertEquals(0, loader.getMaxProcId());
    assertEquals(0, loader.getLoadedCount());
    assertEquals(0, loader.getCorruptedCount());
}
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 7 with HBaseCommonTestingUtility

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

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

the class TestStateMachineProcedure method setUp.

@Before
public void setUp() throws IOException {
    htu = new HBaseCommonTestingUtility();
    testDir = htu.getDataTestDir();
    fs = testDir.getFileSystem(htu.getConfiguration());
    logDir = new Path(testDir, "proc-logs");
    procStore = ProcedureTestingUtility.createWalStore(htu.getConfiguration(), fs, logDir);
    procExecutor = new ProcedureExecutor(htu.getConfiguration(), new TestProcEnv(), 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)

Example 9 with HBaseCommonTestingUtility

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

the class TestYieldProcedures 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);
    procRunnables = new TestScheduler();
    procExecutor = new ProcedureExecutor(htu.getConfiguration(), new TestProcEnv(), procStore, procRunnables);
    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)

Example 10 with HBaseCommonTestingUtility

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

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