Class ReplicationSourceWALActionListener
java.lang.Object
org.apache.hadoop.hbase.replication.regionserver.ReplicationSourceWALActionListener
- All Implemented Interfaces:
WALActionsListener
Used to receive new wals.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.regionserver.wal.WALActionsListener
WALActionsListener.RollRequestReason
-
Field Summary
Modifier and TypeFieldDescriptionprivate final org.apache.hadoop.conf.Configuration
private final ReplicationSourceManager
-
Constructor Summary
ConstructorDescriptionReplicationSourceWALActionListener
(org.apache.hadoop.conf.Configuration conf, ReplicationSourceManager manager) -
Method Summary
Modifier and TypeMethodDescriptionvoid
postLogRoll
(org.apache.hadoop.fs.Path oldPath, org.apache.hadoop.fs.Path newPath) The WAL has been rolled.(package private) static void
scopeWALEdits
(WALKey logKey, WALEdit logEdit, org.apache.hadoop.conf.Configuration conf) Utility method used to set the correct scopes on each log key.void
visitLogEntryBeforeWrite
(RegionInfo info, WALKey logKey, WALEdit logEdit) Called before each write.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, logRollRequested, postAppend, postLogArchive, postSync, preLogArchive, preLogRoll
-
Field Details
-
conf
-
manager
-
-
Constructor Details
-
ReplicationSourceWALActionListener
public ReplicationSourceWALActionListener(org.apache.hadoop.conf.Configuration conf, ReplicationSourceManager manager)
-
-
Method Details
-
postLogRoll
public void postLogRoll(org.apache.hadoop.fs.Path oldPath, org.apache.hadoop.fs.Path newPath) throws IOException 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- Throws:
IOException
-
visitLogEntryBeforeWrite
Description copied from interface:WALActionsListener
Called before each write.- Specified by:
visitLogEntryBeforeWrite
in interfaceWALActionsListener
-
scopeWALEdits
static void scopeWALEdits(WALKey logKey, WALEdit logEdit, org.apache.hadoop.conf.Configuration conf) Utility method used to set the correct scopes on each log key. Doesn't set a scope on keys from compaction WAL edits and if the scope is local.- Parameters:
logKey
- Key that may get scoped according to its editslogEdit
- Edits used to lookup the scopes
-