@InterfaceAudience.LimitedPrivate(value="Configuration") public class ReplicationLogCleaner extends BaseLogCleanerDelegate
Modifier and Type | Class and Description |
---|---|
static class |
ReplicationLogCleaner.WarnOnlyAbortable |
Modifier and Type | Field and Description |
---|---|
private static org.apache.commons.logging.Log |
LOG |
private ReplicationQueuesClient |
replicationQueues |
private boolean |
stopped |
private ZooKeeperWatcher |
zkw |
Constructor and Description |
---|
ReplicationLogCleaner() |
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
|
boolean |
isStopped() |
private Set<String> |
loadWALsFromQueues()
Load all wals in all replication queues from ZK.
|
void |
setConf(org.apache.hadoop.conf.Configuration config) |
void |
setConf(org.apache.hadoop.conf.Configuration conf,
ZooKeeperWatcher zk) |
void |
setConf(org.apache.hadoop.conf.Configuration conf,
ZooKeeperWatcher zk,
ReplicationQueuesClient replicationQueuesClient) |
void |
stop(String why)
Stop this service.
|
isFileDeletable, isLogDeletable
init
getConf
private static final org.apache.commons.logging.Log LOG
private ZooKeeperWatcher zkw
private ReplicationQueuesClient replicationQueues
private boolean stopped
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> loadWALsFromQueues() 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
public void setConf(org.apache.hadoop.conf.Configuration conf, ZooKeeperWatcher zk)
public void setConf(org.apache.hadoop.conf.Configuration conf, ZooKeeperWatcher zk, ReplicationQueuesClient replicationQueuesClient)
public void stop(String why)
Stoppable
why
- Why we're stopping.public boolean isStopped()
Stoppable.stop(String)
has been closed.Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.