Class MetricsWAL

java.lang.Object
org.apache.hadoop.hbase.regionserver.wal.MetricsWAL
All Implemented Interfaces:
WALActionsListener

@Private public class MetricsWAL extends Object implements 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.
  • Field Details

  • Constructor Details

  • Method Details

    • postSync

      public void postSync(long timeInNanos, int handlerSyncs)
      Description copied from interface: WALActionsListener
      For notification post writer sync. Used by metrics system at least.
      Specified by:
      postSync in interface WALActionsListener
      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

      public void postAppend(long size, long time, WALKey logkey, WALEdit logEdit) throws IOException
      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 interface WALActionsListener
      Parameters:
      size - approx length of cells in this append.
      time - elapsed time in milliseconds.
      logkey - A WAL key
      logEdit - 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 interface WALActionsListener
    • postLogRoll

      public void postLogRoll(org.apache.hadoop.fs.Path oldPath, org.apache.hadoop.fs.Path newPath)
      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 interface WALActionsListener
      Parameters:
      oldPath - the path to the old wal
      newPath - the path to the new wal