@InterfaceAudience.LimitedPrivate(value="Configuration") @InterfaceStability.Evolving public class SnapshotLogCleaner extends BaseLogCleanerDelegate
Modifier and Type | Field and Description |
---|---|
private SnapshotFileCache |
cache |
private static long |
DEFAULT_WAL_CACHE_REFRESH_PERIOD
Refresh cache, by default, every 5 minutes
|
private static org.apache.commons.logging.Log |
LOG |
private HMaster |
master |
(package private) static String |
WAL_CACHE_REFRESH_PERIOD_CONF_KEY
Conf key for the frequency to attempt to refresh the cache of hfiles currently used in
snapshots (ms)
|
Constructor and Description |
---|
SnapshotLogCleaner() |
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
|
void |
init(Map<String,Object> params)
this method is used to pass some instance into subclass
|
boolean |
isStopped() |
void |
setConf(org.apache.hadoop.conf.Configuration conf)
This method should only be called once, as it starts a thread to keep the cache
up-to-date.
|
void |
stop(String why)
Stop this service.
|
isFileDeletable, isLogDeletable
getConf
private static final org.apache.commons.logging.Log LOG
static final String WAL_CACHE_REFRESH_PERIOD_CONF_KEY
private static final long DEFAULT_WAL_CACHE_REFRESH_PERIOD
private SnapshotFileCache cache
private HMaster master
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 deletionpublic void init(Map<String,Object> params)
FileCleanerDelegate
init
in interface FileCleanerDelegate
init
in class BaseFileCleanerDelegate
public void setConf(org.apache.hadoop.conf.Configuration conf)
setConf
in interface org.apache.hadoop.conf.Configurable
setConf
in class BaseConfigurable
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.