public DisabledWAL(final Path path, final Configuration conf, final List<WALActionsListener> listeners) { this.coprocessorHost = new WALCoprocessorHost(this, conf); this.path = path; if (null != listeners) { for(WALActionsListener listener : listeners) { registerWALActionsListener(listener); } } }
/** * 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).getCoprocessorHost(); Coprocessor c = host.findCoprocessor(SampleRegionWALObserver.class.getName()); assertNotNull(c); }
/** * 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(null).getCoprocessorHost(); Coprocessor c = host.findCoprocessor(SampleRegionWALCoprocessor.class); assertNotNull(c); }
@Override public WALCoprocessorHost getCoprocessorHost() { return coprocessorHost; }
private SampleRegionWALObserver getCoprocessor(WAL wal, Class<? extends SampleRegionWALObserver> clazz) throws Exception { WALCoprocessorHost host = wal.getCoprocessorHost(); Coprocessor c = host.findCoprocessor(clazz.getName()); return (SampleRegionWALObserver) c; }
private SampleRegionWALObserver getCoprocessor(HLog wal) throws Exception { WALCoprocessorHost host = wal.getCoprocessorHost(); Coprocessor c = host.findCoprocessor(SampleRegionWALObserver.class.getName()); return (SampleRegionWALObserver)c; }
private SampleRegionWALObserver getCoprocessor(HLog wal) throws Exception { WALCoprocessorHost host = wal.getCoprocessorHost(); Coprocessor c = host.findCoprocessor(SampleRegionWALObserver.class .getName()); return (SampleRegionWALObserver) c; }
private SampleRegionWALCoprocessor getCoprocessor(WAL wal, Class<? extends SampleRegionWALCoprocessor> clazz) throws Exception { WALCoprocessorHost host = wal.getCoprocessorHost(); Coprocessor c = host.findCoprocessor(clazz.getName()); return (SampleRegionWALCoprocessor) c; }
@Override public WALCoprocessorHost getCoprocessorHost() { return null; }
/** * @return Coprocessor host. */ WALCoprocessorHost getCoprocessorHost();