@InterfaceAudience.LimitedPrivate(value="Configuration") public class ReplicationHFileCleaner extends BaseHFileCleanerDelegate
Modifier and Type | Class and Description |
---|---|
private static class |
ReplicationHFileCleaner.WarnOnlyAbortable |
Modifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
LOG |
private ReplicationQueuesClient |
rqc |
private boolean |
stopped |
private ZKWatcher |
zkw |
Constructor and Description |
---|
ReplicationHFileCleaner() |
Modifier and Type | Method and Description |
---|---|
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 void |
initReplicationQueuesClient(org.apache.hadoop.conf.Configuration conf,
ZKWatcher zk) |
boolean |
isFileDeletable(org.apache.hadoop.fs.FileStatus fStat)
Should the master delete the file or keep it?
|
boolean |
isStopped() |
private Set<String> |
loadHFileRefsFromPeers()
Load all hfile references in all replication queues from ZK.
|
void |
setConf(org.apache.hadoop.conf.Configuration config) |
void |
setConf(org.apache.hadoop.conf.Configuration conf,
ZKWatcher zk) |
void |
stop(String why)
Stop this service.
|
init
getConf
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
preClean
private static final org.slf4j.Logger LOG
private ReplicationQueuesClient rqc
private boolean stopped
public ReplicationHFileCleaner()
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<String> loadHFileRefsFromPeers() throws org.apache.zookeeper.KeeperException
org.apache.zookeeper.KeeperException
public void setConf(org.apache.hadoop.conf.Configuration config)
setConf
in interface org.apache.hadoop.conf.Configurable
setConf
in class BaseConfigurable
private void initReplicationQueuesClient(org.apache.hadoop.conf.Configuration conf, ZKWatcher zk) throws Exception
Exception
public void stop(String why)
Stoppable
stop
in interface Stoppable
stop
in class BaseHFileCleanerDelegate
why
- Why we're stopping.public boolean isStopped()
isStopped
in interface Stoppable
isStopped
in class BaseHFileCleanerDelegate
Stoppable.stop(String)
has been closed.public boolean isFileDeletable(org.apache.hadoop.fs.FileStatus fStat)
BaseFileCleanerDelegate
isFileDeletable
in class BaseFileCleanerDelegate
fStat
- file status of the file to checkCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.