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
FieldsModifier and TypeFieldDescriptionprivate static final DateTimeFormatterprivate static final org.slf4j.Loggerprivate booleanprivate long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract longgetTtlMs(org.apache.hadoop.conf.Configuration conf) booleanisFileDeletable(org.apache.hadoop.fs.FileStatus status) Should the master delete the file or keep it?booleanReturns True ifStoppable.stop(String)has been closed.final voidsetConf(org.apache.hadoop.conf.Configuration conf) voidStop this service.protected abstract booleanvaliateFilename(org.apache.hadoop.fs.Path file) Methods inherited from class org.apache.hadoop.hbase.master.cleaner.BaseFileCleanerDelegate
getDeletableFiles, initMethods inherited from class org.apache.hadoop.hbase.BaseConfigurable
getConfMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.conf.Configurable
getConfMethods 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:
setConfin interfaceorg.apache.hadoop.conf.Configurable- Overrides:
setConfin classBaseConfigurable
-
isFileDeletable
Description copied from class:BaseFileCleanerDelegateShould the master delete the file or keep it?This method can be called concurrently by multiple threads. Implementations must be thread safe.
- Overrides:
isFileDeletablein 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:StoppableStop this service. Implementers should favor logging errors over throwing RuntimeExceptions.- Parameters:
why- Why we're stopping.
-
isStopped
Description copied from interface:StoppableReturns True ifStoppable.stop(String)has been closed. -
getTtlMs
-
valiateFilename
-