@InterfaceAudience.Private public abstract class BaseTimeToLiveFileCleaner extends BaseLogCleanerDelegate
Modifier and Type | Field and Description |
---|---|
private static DateTimeFormatter |
FORMATTER |
private static org.slf4j.Logger |
LOG |
private boolean |
stopped |
private long |
ttlMs |
Constructor and Description |
---|
BaseTimeToLiveFileCleaner() |
Modifier and Type | Method and Description |
---|---|
protected abstract long |
getTtlMs(org.apache.hadoop.conf.Configuration conf) |
boolean |
isFileDeletable(org.apache.hadoop.fs.FileStatus status)
Should the master delete the file or keep it?
|
boolean |
isStopped() |
void |
setConf(org.apache.hadoop.conf.Configuration conf) |
void |
stop(String why)
Stop this service.
|
protected abstract boolean |
valiateFilename(org.apache.hadoop.fs.Path file) |
getDeletableFiles, init
getConf
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isEmptyDirDeletable, preClean
private static final org.slf4j.Logger LOG
private static final DateTimeFormatter FORMATTER
private long ttlMs
private volatile boolean stopped
public BaseTimeToLiveFileCleaner()
public final void setConf(org.apache.hadoop.conf.Configuration conf)
setConf
in interface org.apache.hadoop.conf.Configurable
setConf
in class BaseConfigurable
public boolean isFileDeletable(org.apache.hadoop.fs.FileStatus status)
BaseFileCleanerDelegate
isFileDeletable
in class BaseLogCleanerDelegate
status
- file status of the file to checkpublic void stop(String why)
Stoppable
why
- Why we're stopping.public boolean isStopped()
Stoppable.stop(String)
has been closed.protected abstract long getTtlMs(org.apache.hadoop.conf.Configuration conf)
protected abstract boolean valiateFilename(org.apache.hadoop.fs.Path file)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.