@InterfaceAudience.LimitedPrivate(value="Configuration") public class ReplicationLogCleaner extends BaseLogCleanerDelegate
Modifier and Type | Field and Description |
---|---|
private ReplicationLogCleanerBarrier |
barrier |
private boolean |
canFilter |
private Supplier<Set<ServerName>> |
getNotFullyDeadServers |
private static org.slf4j.Logger |
LOG |
private Set<ServerName> |
notFullyDeadServers |
private Set<String> |
peerIds |
private Map<ServerName,Map<String,Map<String,ReplicationGroupOffset>>> |
replicationOffsets |
private ReplicationPeerManager |
rpm |
private boolean |
stopped |
Constructor and Description |
---|
ReplicationLogCleaner() |
Modifier and Type | Method and Description |
---|---|
private boolean |
filterForDeadRegionServer(ServerName serverName,
org.apache.hadoop.fs.FileStatus file) |
private boolean |
filterForLiveRegionServer(ServerName serverName,
org.apache.hadoop.fs.FileStatus file) |
Iterable<org.apache.hadoop.fs.FileStatus> |
getDeletableFiles(Iterable<org.apache.hadoop.fs.FileStatus> files)
Determines which of the given files are safe to delete
|
private Set<ServerName> |
getNotFullyDeadServers(MasterServices services) |
void |
init(Map<String,Object> params)
this method is used to pass some instance into subclass
|
boolean |
isStopped()
Returns True if
Stoppable.stop(String) has been closed. |
void |
postClean()
Will be called after cleaner run.
|
void |
preClean()
Used to do some initialize work before every period clean
|
private boolean |
shouldDelete(ReplicationGroupOffset offset,
org.apache.hadoop.fs.FileStatus file) |
void |
stop(String why)
Stop this service.
|
isFileDeletable
getConf, setConf
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isEmptyDirDeletable
private static final org.slf4j.Logger LOG
private Set<ServerName> notFullyDeadServers
private Map<ServerName,Map<String,Map<String,ReplicationGroupOffset>>> replicationOffsets
private ReplicationLogCleanerBarrier barrier
private ReplicationPeerManager rpm
private Supplier<Set<ServerName>> getNotFullyDeadServers
private boolean canFilter
private boolean stopped
public ReplicationLogCleaner()
public void preClean()
FileCleanerDelegate
public void postClean()
FileCleanerDelegate
private boolean shouldDelete(ReplicationGroupOffset offset, org.apache.hadoop.fs.FileStatus file)
private boolean filterForLiveRegionServer(ServerName serverName, org.apache.hadoop.fs.FileStatus file)
private boolean filterForDeadRegionServer(ServerName serverName, org.apache.hadoop.fs.FileStatus file)
public Iterable<org.apache.hadoop.fs.FileStatus> getDeletableFiles(Iterable<org.apache.hadoop.fs.FileStatus> files)
FileCleanerDelegate
getDeletableFiles
in interface FileCleanerDelegate
getDeletableFiles
in class BaseFileCleanerDelegate
files
- files to check for deletionprivate Set<ServerName> getNotFullyDeadServers(MasterServices services)
public void init(Map<String,Object> params)
FileCleanerDelegate
init
in interface FileCleanerDelegate
init
in class BaseFileCleanerDelegate
public void stop(String why)
Stoppable
why
- Why we're stopping.public boolean isStopped()
Stoppable
Stoppable.stop(String)
has been closed.Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.