org.apache.hadoop.hbase.regionserver.wal
Interface WALActionsListener

All Known Implementing Classes:
MetricsWAL, Replication

@InterfaceAudience.Private
public interface WALActionsListener

Get notification of FSHLog/WAL log events. The invocations are inline so make sure your implementation is fast else you'll slow hbase.


Method Summary
 void logCloseRequested()
          The WAL is about to close.
 void logRollRequested(boolean tooFewReplicas)
          A request was made that the WAL be rolled.
 void postLogArchive(org.apache.hadoop.fs.Path oldPath, org.apache.hadoop.fs.Path newPath)
          The WAL has been archived.
 void postLogRoll(org.apache.hadoop.fs.Path oldPath, org.apache.hadoop.fs.Path newPath)
          The WAL has been rolled.
 void preLogArchive(org.apache.hadoop.fs.Path oldPath, org.apache.hadoop.fs.Path newPath)
          The WAL is going to be archived.
 void preLogRoll(org.apache.hadoop.fs.Path oldPath, org.apache.hadoop.fs.Path newPath)
          The WAL is going to be rolled.
 void visitLogEntryBeforeWrite(HRegionInfo info, HLogKey logKey, WALEdit logEdit)
          Called before each write.
 void visitLogEntryBeforeWrite(HTableDescriptor htd, HLogKey logKey, WALEdit logEdit)
           
 

Method Detail

preLogRoll

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 hlog
newPath - the path to the new hlog
Throws:
IOException

postLogRoll

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 hlog
newPath - the path to the new hlog
Throws:
IOException

preLogArchive

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 hlog
newPath - the path to the new hlog
Throws:
IOException

postLogArchive

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 hlog
newPath - the path to the new hlog
Throws:
IOException

logRollRequested

void logRollRequested(boolean tooFewReplicas)
A request was made that the WAL be rolled.

Parameters:
tooFewReplicas - roll requested because of too few replicas if true

logCloseRequested

void logCloseRequested()
The WAL is about to close.


visitLogEntryBeforeWrite

void visitLogEntryBeforeWrite(HRegionInfo info,
                              HLogKey logKey,
                              WALEdit logEdit)
Called before each write.

Parameters:
info -
logKey -
logEdit -

visitLogEntryBeforeWrite

void visitLogEntryBeforeWrite(HTableDescriptor htd,
                              HLogKey logKey,
                              WALEdit logEdit)
Parameters:
htd -
logKey -
logEdit -


Copyright © 2007–2015 The Apache Software Foundation. All rights reserved.