@InterfaceAudience.Private class ReplicationSourceWALActionListener extends Object implements WALActionsListener
WALActionsListener.RollRequestReason
Modifier and Type | Field and Description |
---|---|
private org.apache.hadoop.conf.Configuration |
conf |
private ReplicationSourceManager |
manager |
Constructor and Description |
---|
ReplicationSourceWALActionListener(org.apache.hadoop.conf.Configuration conf,
ReplicationSourceManager manager) |
Modifier and Type | Method and Description |
---|---|
void |
postLogRoll(org.apache.hadoop.fs.Path oldPath,
org.apache.hadoop.fs.Path newPath)
The WAL has been rolled.
|
void |
preLogRoll(org.apache.hadoop.fs.Path oldPath,
org.apache.hadoop.fs.Path newPath)
The WAL is going to be 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(WALKey logKey,
WALEdit logEdit) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
logCloseRequested, logRollRequested, postAppend, postLogArchive, postSync, preLogArchive, visitLogEntryBeforeWrite
private final org.apache.hadoop.conf.Configuration conf
private final ReplicationSourceManager manager
public ReplicationSourceWALActionListener(org.apache.hadoop.conf.Configuration conf, ReplicationSourceManager manager)
public void preLogRoll(org.apache.hadoop.fs.Path oldPath, org.apache.hadoop.fs.Path newPath) throws IOException
WALActionsListener
preLogRoll
in interface WALActionsListener
oldPath
- the path to the old walnewPath
- the path to the new walIOException
public void postLogRoll(org.apache.hadoop.fs.Path oldPath, org.apache.hadoop.fs.Path newPath) throws IOException
WALActionsListener
postLogRoll
in interface WALActionsListener
oldPath
- the path to the old walnewPath
- the path to the new walIOException
public void visitLogEntryBeforeWrite(WALKey logKey, WALEdit logEdit) throws IOException
visitLogEntryBeforeWrite
in interface WALActionsListener
logEdit
- TODO: Retire this in favor of
WALActionsListener.visitLogEntryBeforeWrite(RegionInfo, WALKey, WALEdit)
It only exists to get
scope when replicating. Scope should be in the WALKey and not need us passing in a
htd
.IOException
- If failed to parse the WALEditstatic void scopeWALEdits(WALKey logKey, WALEdit logEdit, org.apache.hadoop.conf.Configuration conf)
logKey
- Key that may get scoped according to its editslogEdit
- Edits used to lookup the scopesCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.