Search in sources :

Example 1 with WALCoprocessorHost

use of org.apache.hadoop.hbase.regionserver.wal.WALCoprocessorHost in project hbase by apache.

the class TestWALFactory method testWALCoprocessorLoaded.

/**
   * A loaded WAL coprocessor won't break existing WAL test cases.
   */
@Test
public void testWALCoprocessorLoaded() throws Exception {
    // test to see whether the coprocessor is loaded or not.
    WALCoprocessorHost host = wals.getWAL(UNSPECIFIED_REGION, null).getCoprocessorHost();
    Coprocessor c = host.findCoprocessor(SampleRegionWALObserver.class.getName());
    assertNotNull(c);
}
Also used : WALCoprocessorHost(org.apache.hadoop.hbase.regionserver.wal.WALCoprocessorHost) SampleRegionWALObserver(org.apache.hadoop.hbase.coprocessor.SampleRegionWALObserver) Coprocessor(org.apache.hadoop.hbase.Coprocessor) Test(org.junit.Test)

Example 2 with WALCoprocessorHost

use of org.apache.hadoop.hbase.regionserver.wal.WALCoprocessorHost in project hbase by apache.

the class TestWALObserver method getCoprocessor.

private SampleRegionWALObserver getCoprocessor(WAL wal, Class<? extends SampleRegionWALObserver> clazz) throws Exception {
    WALCoprocessorHost host = wal.getCoprocessorHost();
    Coprocessor c = host.findCoprocessor(clazz.getName());
    return (SampleRegionWALObserver) c;
}
Also used : WALCoprocessorHost(org.apache.hadoop.hbase.regionserver.wal.WALCoprocessorHost) Coprocessor(org.apache.hadoop.hbase.Coprocessor)

Aggregations

Coprocessor (org.apache.hadoop.hbase.Coprocessor)2 WALCoprocessorHost (org.apache.hadoop.hbase.regionserver.wal.WALCoprocessorHost)2 SampleRegionWALObserver (org.apache.hadoop.hbase.coprocessor.SampleRegionWALObserver)1 Test (org.junit.Test)1