@InterfaceAudience.LimitedPrivate(value="Coprocesssor") @InterfaceStability.Evolving public interface WALObserver extends Coprocessor
WALEdit.isEmpty()
.
RegionObserver
provides
hooks for adding logic for WALEdits in the region context during reconstruction,
Defines coprocessor hooks for interacting with operations on the
WAL
.Coprocessor.State
PRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_SYSTEM, PRIORITY_USER, VERSION
Modifier and Type | Method and Description |
---|---|
void |
postWALWrite(ObserverContext<? extends WALCoprocessorEnvironment> ctx,
HRegionInfo info,
WALKey logKey,
WALEdit logEdit)
Called after a
WALEdit
is writen to WAL. |
void |
postWALWrite(ObserverContext<WALCoprocessorEnvironment> ctx,
HRegionInfo info,
HLogKey logKey,
WALEdit logEdit)
Deprecated.
|
boolean |
preWALWrite(ObserverContext<? extends WALCoprocessorEnvironment> ctx,
HRegionInfo info,
WALKey logKey,
WALEdit logEdit)
Called before a
WALEdit
is writen to WAL. |
boolean |
preWALWrite(ObserverContext<WALCoprocessorEnvironment> ctx,
HRegionInfo info,
HLogKey logKey,
WALEdit logEdit)
Deprecated.
|
start, stop
boolean preWALWrite(ObserverContext<? extends WALCoprocessorEnvironment> ctx, HRegionInfo info, WALKey logKey, WALEdit logEdit) throws IOException
WALEdit
is writen to WAL.IOException
@Deprecated boolean preWALWrite(ObserverContext<WALCoprocessorEnvironment> ctx, HRegionInfo info, HLogKey logKey, WALEdit logEdit) throws IOException
preWALWrite(ObserverContext, HRegionInfo, WALKey, WALEdit)
WALEdit
is writen to WAL.
This method is left in place to maintain binary compatibility with older
WALObserver
s. If an implementation directly overrides
preWALWrite(ObserverContext, HRegionInfo, WALKey, WALEdit)
then this version
won't be called at all, barring problems with the Security Manager. To work correctly
in the presence of a strict Security Manager, or in the case of an implementation that
relies on a parent class to implement preWALWrite, you should implement this method
as a call to the non-deprecated version.
Users of this method will see all edits that can be treated as HLogKey. If there are
edits that can't be treated as HLogKey they won't be offered to coprocessors that rely
on this method. If a coprocessor gets skipped because of this mechanism, a log message
at ERROR will be generated per coprocessor on the logger for CoprocessorHost
once per
classloader.IOException
void postWALWrite(ObserverContext<? extends WALCoprocessorEnvironment> ctx, HRegionInfo info, WALKey logKey, WALEdit logEdit) throws IOException
WALEdit
is writen to WAL.IOException
@Deprecated void postWALWrite(ObserverContext<WALCoprocessorEnvironment> ctx, HRegionInfo info, HLogKey logKey, WALEdit logEdit) throws IOException
postWALWrite(ObserverContext, HRegionInfo, WALKey, WALEdit)
WALEdit
is writen to WAL.
This method is left in place to maintain binary compatibility with older
WALObserver
s. If an implementation directly overrides
postWALWrite(ObserverContext, HRegionInfo, WALKey, WALEdit)
then this version
won't be called at all, barring problems with the Security Manager. To work correctly
in the presence of a strict Security Manager, or in the case of an implementation that
relies on a parent class to implement preWALWrite, you should implement this method
as a call to the non-deprecated version.
Users of this method will see all edits that can be treated as HLogKey. If there are
edits that can't be treated as HLogKey they won't be offered to coprocessors that rely
on this method. If a coprocessor gets skipped because of this mechanism, a log message
at ERROR will be generated per coprocessor on the logger for CoprocessorHost
once per
classloader.IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.