public interface WALActionsListener
Modifier and Type | Method and Description |
---|---|
default void |
logCloseRequested()
The WAL is about to close.
|
default void |
logRollRequested(boolean tooFewReplicas)
A request was made that the WAL be rolled.
|
default void |
postAppend(long entryLen,
long elapsedTimeMillis,
WALKey logKey,
WALEdit logEdit)
For notification post append to the writer.
|
default void |
postLogArchive(Path oldPath,
Path newPath)
The WAL has been archived.
|
default void |
postLogRoll(Path oldPath,
Path newPath)
The WAL has been rolled.
|
default void |
postSync(long timeInNanos,
int handlerSyncs)
For notification post writer sync.
|
default void |
preLogArchive(Path oldPath,
Path newPath)
The WAL is going to be archived.
|
default void |
preLogRoll(Path oldPath,
Path newPath)
The WAL is going to be rolled.
|
default void |
visitLogEntryBeforeWrite(RegionInfo info,
WALKey logKey,
WALEdit logEdit)
Called before each write.
|
default void |
visitLogEntryBeforeWrite(WALKey logKey,
WALEdit logEdit) |
default void preLogRoll(Path oldPath, Path newPath) throws java.io.IOException
oldPath
- the path to the old walnewPath
- the path to the new waljava.io.IOException
default void postLogRoll(Path oldPath, Path newPath) throws java.io.IOException
oldPath
- the path to the old walnewPath
- the path to the new waljava.io.IOException
default void preLogArchive(Path oldPath, Path newPath) throws java.io.IOException
oldPath
- the path to the old walnewPath
- the path to the new waljava.io.IOException
default void postLogArchive(Path oldPath, Path newPath) throws java.io.IOException
oldPath
- the path to the old walnewPath
- the path to the new waljava.io.IOException
default void logRollRequested(boolean tooFewReplicas)
default void logCloseRequested()
default void visitLogEntryBeforeWrite(RegionInfo info, WALKey logKey, WALEdit logEdit)
default void visitLogEntryBeforeWrite(WALKey logKey, WALEdit logEdit) throws java.io.IOException
logKey
- logEdit
- TODO: Retire this in favor of
visitLogEntryBeforeWrite(RegionInfo, WALKey, WALEdit)
It only exists to get
scope when replicating. Scope should be in the WALKey and not need us passing in a
htd
.java.io.IOException
- If failed to parse the WALEditdefault void postAppend(long entryLen, long elapsedTimeMillis, WALKey logKey, WALEdit logEdit) throws java.io.IOException
entryLen
- approx length of cells in this append.elapsedTimeMillis
- elapsed time in milliseconds.logKey
- A WAL keylogEdit
- A WAL edit containing list of cells.java.io.IOException
- if any network or I/O error occurreddefault void postSync(long timeInNanos, int handlerSyncs)
timeInNanos
- How long the filesystem sync took in nanoseconds.handlerSyncs
- How many sync handler calls were released by this call to filesystem
sync.