@InterfaceAudience.LimitedPrivate(value="Coprocesssor")
@InterfaceStability.Evolving
public interface WALObserver
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
.
Since most implementations will be interested in only a subset of hooks, this class uses
'default' functions to avoid having to add unnecessary overrides. When the functions are
non-empty, it's simply to satisfy the compiler by returning value of expected (non-void) type.
It is done in a way that these default definitions act as no-op. So our suggestion to
implementation would be to not call these 'default' methods from overrides.
IOException
are reported back to client.CoprocessorHost.ABORT_ON_ERROR_KEY
is set to true, then
the server aborts.DoNotRetryIOException
is returned to the client.Modifier and Type | Method and Description |
---|---|
default void |
postWALRoll(ObserverContext<? extends WALCoprocessorEnvironment> ctx,
org.apache.hadoop.fs.Path oldPath,
org.apache.hadoop.fs.Path newPath)
Called after rolling the current WAL
|
default void |
postWALWrite(ObserverContext<? extends WALCoprocessorEnvironment> ctx,
RegionInfo info,
WALKey logKey,
WALEdit logEdit)
Deprecated.
Since hbase-2.0.0. To be replaced with an alternative that does not expose
InterfaceAudience classes such as WALKey and WALEdit. Will be removed in hbase-3.0.0.
|
default void |
preWALRoll(ObserverContext<? extends WALCoprocessorEnvironment> ctx,
org.apache.hadoop.fs.Path oldPath,
org.apache.hadoop.fs.Path newPath)
Called before rolling the current WAL
|
default void |
preWALWrite(ObserverContext<? extends WALCoprocessorEnvironment> ctx,
RegionInfo info,
WALKey logKey,
WALEdit logEdit)
Deprecated.
Since hbase-2.0.0. To be replaced with an alternative that does not expose
InterfaceAudience classes such as WALKey and WALEdit. Will be removed in hbase-3.0.0.
|
@Deprecated default void preWALWrite(ObserverContext<? extends WALCoprocessorEnvironment> ctx, RegionInfo info, WALKey logKey, WALEdit logEdit) throws IOException
WALEdit
is writen to WAL.
Do not amend the WALKey. It is InterfaceAudience.Private. Changing the WALKey will cause
damage.IOException
@Deprecated default void postWALWrite(ObserverContext<? extends WALCoprocessorEnvironment> ctx, RegionInfo info, WALKey logKey, WALEdit logEdit) throws IOException
WALEdit
is writen to WAL.
Do not amend the WALKey. It is InterfaceAudience.Private. Changing the WALKey will cause
damage.IOException
default void preWALRoll(ObserverContext<? extends WALCoprocessorEnvironment> ctx, org.apache.hadoop.fs.Path oldPath, org.apache.hadoop.fs.Path newPath) throws IOException
oldPath
- the path of the current wal that we are replacingnewPath
- the path of the wal we are going to createIOException
default void postWALRoll(ObserverContext<? extends WALCoprocessorEnvironment> ctx, org.apache.hadoop.fs.Path oldPath, org.apache.hadoop.fs.Path newPath) throws IOException
oldPath
- the path of the wal that we replacednewPath
- the path of the wal we have created and now is the currentIOException
Copyright © 2007–2019 Cloudera. All rights reserved.