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);
}
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;
}
Aggregations