Class BaseTimeToLiveFileCleaner
java.lang.Object
org.apache.hadoop.hbase.BaseConfigurable
org.apache.hadoop.hbase.master.cleaner.BaseFileCleanerDelegate
org.apache.hadoop.hbase.master.cleaner.BaseLogCleanerDelegate
org.apache.hadoop.hbase.master.cleaner.BaseTimeToLiveFileCleaner
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable
,FileCleanerDelegate
,Stoppable
- Direct Known Subclasses:
TimeToLiveHFileCleaner
,TimeToLiveLogCleaner
,TimeToLiveMasterLocalStoreHFileCleaner
,TimeToLiveMasterLocalStoreWALCleaner
,TimeToLiveProcedureWALCleaner
Base class for time to live file cleaner.
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final DateTimeFormatter
private static final org.slf4j.Logger
private boolean
private long
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected 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
Returns True ifStoppable.stop(String)
has been closed.final void
setConf
(org.apache.hadoop.conf.Configuration conf) void
Stop this service.protected abstract boolean
valiateFilename
(org.apache.hadoop.fs.Path file) Methods inherited from class org.apache.hadoop.hbase.master.cleaner.BaseFileCleanerDelegate
getDeletableFiles, init
Methods inherited from class org.apache.hadoop.hbase.BaseConfigurable
getConf
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hadoop.conf.Configurable
getConf
Methods inherited from interface org.apache.hadoop.hbase.master.cleaner.FileCleanerDelegate
isEmptyDirDeletable, postClean, preClean
-
Field Details
-
LOG
-
FORMATTER
-
ttlMs
-
stopped
-
-
Constructor Details
-
BaseTimeToLiveFileCleaner
public BaseTimeToLiveFileCleaner()
-
-
Method Details
-
setConf
- Specified by:
setConf
in interfaceorg.apache.hadoop.conf.Configurable
- Overrides:
setConf
in classBaseConfigurable
-
isFileDeletable
Description copied from class:BaseFileCleanerDelegate
Should the master delete the file or keep it?- Overrides:
isFileDeletable
in classBaseLogCleanerDelegate
- Parameters:
status
- file status of the file to check- Returns:
- true if the file is deletable, false if not
-
stop
Description copied from interface:Stoppable
Stop this service. Implementers should favor logging errors over throwing RuntimeExceptions.- Parameters:
why
- Why we're stopping.
-
isStopped
Description copied from interface:Stoppable
Returns True ifStoppable.stop(String)
has been closed. -
getTtlMs
-
valiateFilename
-