Class MetricsWAL
java.lang.Object
org.apache.hadoop.hbase.regionserver.wal.MetricsWAL
- All Implemented Interfaces:
WALActionsListener
Class used to push numbers about the WAL into the metrics subsystem. This will take a single
function call and turn it into multiple manipulations of the hadoop metrics system.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.regionserver.wal.WALActionsListener
WALActionsListener.RollRequestReason
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
private final MetricsWALSource
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.regionserver.wal.WALActionsListener
logCloseRequested, postLogArchive, preLogArchive, preLogRoll, visitLogEntryBeforeWrite
-
Field Details
-
LOG
-
source
-
-
Constructor Details
-
MetricsWAL
public MetricsWAL() -
MetricsWAL
-
-
Method Details
-
postSync
Description copied from interface:WALActionsListener
For notification post writer sync. Used by metrics system at least.- Specified by:
postSync
in interfaceWALActionsListener
- Parameters:
timeInNanos
- How long the filesystem sync took in nanoseconds.handlerSyncs
- How many sync handler calls were released by this call to filesystem sync.
-
postAppend
Description copied from interface:WALActionsListener
For notification post append to the writer. Used by metrics system at least. TODO: Combine this with above.- Specified by:
postAppend
in interfaceWALActionsListener
- Parameters:
size
- approx length of cells in this append.time
- elapsed time in milliseconds.logkey
- A WAL keylogEdit
- A WAL edit containing list of cells.- Throws:
IOException
- if any network or I/O error occurred
-
logRollRequested
Description copied from interface:WALActionsListener
A request was made that the WAL be rolled.- Specified by:
logRollRequested
in interfaceWALActionsListener
-
postLogRoll
Description copied from interface:WALActionsListener
The WAL has been rolled. The oldPath can be null if this is the first log file from the regionserver.- Specified by:
postLogRoll
in interfaceWALActionsListener
- Parameters:
oldPath
- the path to the old walnewPath
- the path to the new wal
-