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
.
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 © 2007–2016 The Apache Software Foundation. All rights reserved.