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
FieldsModifier and TypeFieldDescriptionprivate final org.apache.hadoop.conf.Configurationprivate final ReplicationSourceManager -
Constructor Summary
ConstructorsConstructorDescriptionReplicationSourceWALActionListener(org.apache.hadoop.conf.Configuration conf, ReplicationSourceManager manager) -
Method Summary
Modifier and TypeMethodDescriptionvoidpostLogRoll(org.apache.hadoop.fs.Path oldPath, org.apache.hadoop.fs.Path newPath) The WAL has been rolled.(package private) static voidscopeWALEdits(WALKey logKey, WALEdit logEdit, org.apache.hadoop.conf.Configuration conf) Utility method used to set the correct scopes on each log key.voidvisitLogEntryBeforeWrite(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, waitMethods 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:WALActionsListenerThe WAL has been rolled. The oldPath can be null if this is the first log file from the regionserver.- Specified by:
postLogRollin interfaceWALActionsListener- Parameters:
oldPath- the path to the old walnewPath- the path to the new wal- Throws:
IOException
-
visitLogEntryBeforeWrite
Description copied from interface:WALActionsListenerCalled before each write.- Specified by:
visitLogEntryBeforeWritein 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
-