org.apache.hadoop.hbase.coprocessor
Class BaseWALObserver

java.lang.Object
  extended by org.apache.hadoop.hbase.coprocessor.BaseWALObserver
All Implemented Interfaces:
Coprocessor, WALObserver

@InterfaceAudience.LimitedPrivate(value="Coprocesssor")
@InterfaceStability.Evolving
public class BaseWALObserver
extends Object
implements WALObserver

An abstract class that implements WALObserver. By extending it, you can create your own WAL observer without overriding all abstract methods of WALObserver.


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
 
Constructor Summary
BaseWALObserver()
           
 
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.
 void start(CoprocessorEnvironment e)
           
 void stop(CoprocessorEnvironment e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseWALObserver

public BaseWALObserver()
Method Detail

start

public void start(CoprocessorEnvironment e)
           throws IOException
Specified by:
start in interface Coprocessor
Throws:
IOException

stop

public void stop(CoprocessorEnvironment e)
          throws IOException
Specified by:
stop in interface Coprocessor
Throws:
IOException

preWALWrite

public boolean preWALWrite(ObserverContext<WALCoprocessorEnvironment> ctx,
                           HRegionInfo info,
                           HLogKey logKey,
                           WALEdit logEdit)
                    throws IOException
Description copied from interface: WALObserver
Called before a WALEdit is writen to WAL.

Specified by:
preWALWrite in interface WALObserver
Returns:
true if default behavior should be bypassed, false otherwise
Throws:
IOException

postWALWrite

public void postWALWrite(ObserverContext<WALCoprocessorEnvironment> ctx,
                         HRegionInfo info,
                         HLogKey logKey,
                         WALEdit logEdit)
                  throws IOException
Description copied from interface: WALObserver
Called after a WALEdit is writen to WAL.

Specified by:
postWALWrite in interface WALObserver
Throws:
IOException


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