Interface FileCleanerDelegate
- All Superinterfaces:
org.apache.hadoop.conf.Configurable
,Stoppable
- All Known Implementing Classes:
BackupHFileCleaner
,BackupLogCleaner
,BaseFileCleanerDelegate
,BaseHFileCleanerDelegate
,BaseLogCleanerDelegate
,BaseTimeToLiveFileCleaner
,HFileLinkCleaner
,LongTermArchivingHFileCleaner
,ManualMobMaintHFileCleaner
,ReplicationHFileCleaner
,ReplicationLogCleaner
,SnapshotHFileCleaner
,SnapshotScannerHDFSAclCleaner
,TimeToLiveHFileCleaner
,TimeToLiveLogCleaner
,TimeToLiveMasterLocalStoreHFileCleaner
,TimeToLiveMasterLocalStoreWALCleaner
,TimeToLiveProcedureWALCleaner
@Private
public interface FileCleanerDelegate
extends org.apache.hadoop.conf.Configurable, Stoppable
General interface for cleaning files from a folder (generally an archive or backup folder). These
are chained via the
CleanerChore
to determine if a given file should be deleted.-
Method Summary
Modifier and TypeMethodDescriptionIterable<org.apache.hadoop.fs.FileStatus>
getDeletableFiles
(Iterable<org.apache.hadoop.fs.FileStatus> files) Determines which of the given files are safe to deletevoid
this method is used to pass some instance into subclassdefault boolean
isEmptyDirDeletable
(org.apache.hadoop.fs.Path dir) Check if a empty directory with no subdirs or subfiles can be deleteddefault void
Used to do some cleanup workdefault void
preClean()
Used to do some initialize work before every period cleanMethods inherited from interface org.apache.hadoop.conf.Configurable
getConf, setConf
-
Method Details
-
getDeletableFiles
Iterable<org.apache.hadoop.fs.FileStatus> getDeletableFiles(Iterable<org.apache.hadoop.fs.FileStatus> files) Determines which of the given files are safe to delete- Parameters:
files
- files to check for deletion- Returns:
- files that are ok to delete according to this cleaner
-
init
this method is used to pass some instance into subclass -
preClean
Used to do some initialize work before every period clean -
postClean
Used to do some cleanup work -
isEmptyDirDeletable
Check if a empty directory with no subdirs or subfiles can be deleted- Parameters:
dir
- Path of the directory- Returns:
- True if the directory can be deleted, otherwise false
-