org.apache.hadoop.hbase.coprocessor
Interface WALObserver

All Superinterfaces:
Coprocessor
All Known Implementing Classes:
BaseWALObserver

@InterfaceAudience.LimitedPrivate(value="Coprocesssor")
@InterfaceStability.Evolving
public interface WALObserver
extends Coprocessor

It's provided to have a way for coprocessors to observe, rewrite, or skip WALEdits as they are being written to the WAL. RegionObserver provides hooks for adding logic for WALEdits in the region context during reconstruction, Defines coprocessor hooks for interacting with operations on the HLog.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.Coprocessor
Coprocessor.State
 
Field Summary
 
Fields inherited from interface org.apache.hadoop.hbase.Coprocessor
PRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_SYSTEM, PRIORITY_USER, VERSION
 
Method Summary
 void postWALWrite(ObserverContext<WALCoprocessorEnvironment> ctx, HRegionInfo info, HLogKey logKey, WALEdit logEdit)
          Called after a WALEdit is writen to WAL.
 boolean preWALWrite(ObserverContext<WALCoprocessorEnvironment> ctx, HRegionInfo info, HLogKey logKey, WALEdit logEdit)
          Called before a WALEdit is writen to WAL.
 
Methods inherited from interface org.apache.hadoop.hbase.Coprocessor
start, stop
 

Method Detail

preWALWrite

boolean preWALWrite(ObserverContext<WALCoprocessorEnvironment> ctx,
                    HRegionInfo info,
                    HLogKey logKey,
                    WALEdit logEdit)
                    throws IOException
Called before a WALEdit is writen to WAL.

Parameters:
ctx -
info -
logKey -
logEdit -
Returns:
true if default behavior should be bypassed, false otherwise
Throws:
IOException

postWALWrite

void postWALWrite(ObserverContext<WALCoprocessorEnvironment> ctx,
                  HRegionInfo info,
                  HLogKey logKey,
                  WALEdit logEdit)
                  throws IOException
Called after a WALEdit is writen to WAL.

Parameters:
ctx -
info -
logKey -
logEdit -
Throws:
IOException


Copyright © 2015 The Apache Software Foundation. All rights reserved.