@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, initgetConfclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisEmptyDirDeletable, preCleanprivate 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.ConfigurablesetConf in class BaseConfigurablepublic boolean isFileDeletable(org.apache.hadoop.fs.FileStatus status)
BaseFileCleanerDelegateisFileDeletable in class BaseLogCleanerDelegatestatus - file status of the file to checkpublic void stop(String why)
Stoppablewhy - 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.