Interface WALActionsListener

All Known Implementing Classes:
MetricsWAL, ReplicationSourceWALActionListener, WALEventTrackerListener

@Private public interface WALActionsListener
Get notification of WAL events. The invocations are inline so make sure your implementation is fast else you'll slow hbase.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    The reason for the log roll request.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    The WAL is about to close.
    default void
    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(org.apache.hadoop.fs.Path oldPath, org.apache.hadoop.fs.Path newPath)
    The WAL has been archived.
    default void
    postLogRoll(org.apache.hadoop.fs.Path oldPath, org.apache.hadoop.fs.Path newPath)
    The WAL has been rolled.
    default void
    postSync(long timeInNanos, int handlerSyncs)
    For notification post writer sync.
    default void
    preLogArchive(org.apache.hadoop.fs.Path oldPath, org.apache.hadoop.fs.Path newPath)
    The WAL is going to be archived.
    default void
    preLogRoll(org.apache.hadoop.fs.Path oldPath, org.apache.hadoop.fs.Path newPath)
    The WAL is going to be rolled.
    default void
    Called before each write.
  • Method Details

    • preLogRoll

      default void preLogRoll(org.apache.hadoop.fs.Path oldPath, org.apache.hadoop.fs.Path newPath) throws IOException
      The WAL is going to be rolled. The oldPath can be null if this is the first log file from the regionserver.
      Parameters:
      oldPath - the path to the old wal
      newPath - the path to the new wal
      Throws:
      IOException
    • postLogRoll

      default void postLogRoll(org.apache.hadoop.fs.Path oldPath, org.apache.hadoop.fs.Path newPath) throws IOException
      The WAL has been rolled. The oldPath can be null if this is the first log file from the regionserver.
      Parameters:
      oldPath - the path to the old wal
      newPath - the path to the new wal
      Throws:
      IOException
    • preLogArchive

      default void preLogArchive(org.apache.hadoop.fs.Path oldPath, org.apache.hadoop.fs.Path newPath) throws IOException
      The WAL is going to be archived.
      Parameters:
      oldPath - the path to the old wal
      newPath - the path to the new wal
      Throws:
      IOException
    • postLogArchive

      default void postLogArchive(org.apache.hadoop.fs.Path oldPath, org.apache.hadoop.fs.Path newPath) throws IOException
      The WAL has been archived.
      Parameters:
      oldPath - the path to the old wal
      newPath - the path to the new wal
      Throws:
      IOException
    • logRollRequested

      A request was made that the WAL be rolled.
    • logCloseRequested

      default void logCloseRequested()
      The WAL is about to close.
    • visitLogEntryBeforeWrite

      default void visitLogEntryBeforeWrite(RegionInfo info, WALKey logKey, WALEdit logEdit)
      Called before each write.
    • postAppend

      default void postAppend(long entryLen, long elapsedTimeMillis, WALKey logKey, WALEdit logEdit) throws IOException
      For notification post append to the writer. Used by metrics system at least. TODO: Combine this with above.
      Parameters:
      entryLen - approx length of cells in this append.
      elapsedTimeMillis - 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
    • postSync

      default void postSync(long timeInNanos, int handlerSyncs)
      For notification post writer sync. Used by metrics system at least.
      Parameters:
      timeInNanos - How long the filesystem sync took in nanoseconds.
      handlerSyncs - How many sync handler calls were released by this call to filesystem sync.