@InterfaceAudience.Private public class MetricsWAL extends Object implements WALActionsListener
WALActionsListener.RollRequestReason
Modifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
LOG |
private MetricsWALSource |
source |
Constructor and Description |
---|
MetricsWAL() |
MetricsWAL(MetricsWALSource s) |
Modifier and Type | Method and Description |
---|---|
void |
logRollRequested(WALActionsListener.RollRequestReason reason)
A request was made that the WAL be rolled.
|
void |
postAppend(long size,
long time,
WALKey logkey,
WALEdit logEdit)
For notification post append to the writer.
|
void |
postLogRoll(org.apache.hadoop.fs.Path oldPath,
org.apache.hadoop.fs.Path newPath)
The WAL has been rolled.
|
void |
postSync(long timeInNanos,
int handlerSyncs)
For notification post writer sync.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
logCloseRequested, postLogArchive, preLogArchive, preLogRoll, visitLogEntryBeforeWrite
private static final org.slf4j.Logger LOG
private final MetricsWALSource source
public MetricsWAL()
MetricsWAL(MetricsWALSource s)
public void postSync(long timeInNanos, int handlerSyncs)
WALActionsListener
postSync
in interface WALActionsListener
timeInNanos
- How long the filesystem sync took in nanoseconds.handlerSyncs
- How many sync handler calls were released by this call to filesystem sync.public void postAppend(long size, long time, WALKey logkey, WALEdit logEdit) throws IOException
WALActionsListener
postAppend
in interface WALActionsListener
size
- approx length of cells in this append.time
- elapsed time in milliseconds.logkey
- A WAL keylogEdit
- A WAL edit containing list of cells.IOException
- if any network or I/O error occurredpublic void logRollRequested(WALActionsListener.RollRequestReason reason)
WALActionsListener
logRollRequested
in interface WALActionsListener
public void postLogRoll(org.apache.hadoop.fs.Path oldPath, org.apache.hadoop.fs.Path newPath)
WALActionsListener
postLogRoll
in interface WALActionsListener
oldPath
- the path to the old walnewPath
- the path to the new walCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.