@InterfaceAudience.LimitedPrivate(value="Configuration") public class LongTermArchivingHFileCleaner extends BaseHFileCleanerDelegate
BaseHFileCleanerDelegate
that only cleans HFiles that don't belong to a table that is
currently being archived.
This only works properly if the
TimeToLiveHFileCleaner
is also enabled (it always should be), since it may take a little time
for the ZK notification to propagate, in which case we may accidentally
delete some files.
Modifier and Type | Field and Description |
---|---|
(package private) TableHFileArchiveTracker |
archiveTracker |
private org.apache.hadoop.fs.FileSystem |
fs |
private static org.slf4j.Logger |
LOG |
Constructor and Description |
---|
LongTermArchivingHFileCleaner() |
Modifier and Type | Method and Description |
---|---|
boolean |
isFileDeletable(org.apache.hadoop.fs.FileStatus fStat)
Should the master delete the file or keep it?
|
void |
setConf(org.apache.hadoop.conf.Configuration config) |
void |
stop(String reason)
Stop this service.
|
isStopped
getDeletableFiles, init
getConf
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
preClean
private static final org.slf4j.Logger LOG
TableHFileArchiveTracker archiveTracker
private org.apache.hadoop.fs.FileSystem fs
public LongTermArchivingHFileCleaner()
public boolean isFileDeletable(org.apache.hadoop.fs.FileStatus fStat)
BaseFileCleanerDelegate
isFileDeletable
in class BaseFileCleanerDelegate
fStat
- file status of the file to checkpublic void setConf(org.apache.hadoop.conf.Configuration config)
setConf
in interface org.apache.hadoop.conf.Configurable
setConf
in class BaseConfigurable
public void stop(String reason)
Stoppable
stop
in interface Stoppable
stop
in class BaseHFileCleanerDelegate
reason
- Why we're stopping.Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.