Class BrokenStoreFileCleaner
java.lang.Object
org.apache.hadoop.hbase.ScheduledChore
org.apache.hadoop.hbase.regionserver.BrokenStoreFileCleaner
- All Implemented Interfaces:
Runnable
This Chore, every time it runs, will clear the unsused HFiles in the data folder.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final intstatic final doublestatic final booleanstatic final intstatic final longprivate final AtomicBooleanprivate longprivate static final org.slf4j.Loggerprivate HRegionServer -
Constructor Summary
ConstructorsConstructorDescriptionBrokenStoreFileCleaner(int delay, int period, Stoppable stopper, org.apache.hadoop.conf.Configuration conf, HRegionServer regionServer) -
Method Summary
Modifier and TypeMethodDescriptionvoidchore()The task to execute on each scheduled execution of the Choreprivate voidcleanFileIfNeeded(org.apache.hadoop.fs.FileStatus file, HStore store, AtomicLong deletedFiles, AtomicLong failedDeletes) private voiddeleteFile(org.apache.hadoop.fs.FileStatus file, HStore store, AtomicLong deletedFiles, AtomicLong failedDeletes) booleanprivate booleanisActiveStorefile(org.apache.hadoop.fs.FileStatus file, HStore store) private booleanisCompactedFile(org.apache.hadoop.fs.FileStatus file, HStore store) private booleanisCompactionResultFile(org.apache.hadoop.fs.FileStatus file, HStore store) (package private) booleanisOldEnough(org.apache.hadoop.fs.FileStatus file) booleansetEnabled(boolean enabled) (package private) booleanvalidate(org.apache.hadoop.fs.Path file) Methods inherited from class org.apache.hadoop.hbase.ScheduledChore
cancel, cancel, choreForTesting, cleanup, getInitialDelay, getName, getPeriod, getStopper, getTimeUnit, initialChore, isInitialChoreComplete, isScheduled, run, shutdown, shutdown, toString, triggerNow
-
Field Details
-
LOG
-
BROKEN_STOREFILE_CLEANER_ENABLED
- See Also:
-
DEFAULT_BROKEN_STOREFILE_CLEANER_ENABLED
- See Also:
-
BROKEN_STOREFILE_CLEANER_TTL
- See Also:
-
DEFAULT_BROKEN_STOREFILE_CLEANER_TTL
- See Also:
-
BROKEN_STOREFILE_CLEANER_DELAY
- See Also:
-
DEFAULT_BROKEN_STOREFILE_CLEANER_DELAY
- See Also:
-
BROKEN_STOREFILE_CLEANER_DELAY_JITTER
- See Also:
-
DEFAULT_BROKEN_STOREFILE_CLEANER_DELAY_JITTER
- See Also:
-
BROKEN_STOREFILE_CLEANER_PERIOD
- See Also:
-
DEFAULT_BROKEN_STOREFILE_CLEANER_PERIOD
- See Also:
-
regionServer
-
enabled
-
fileTtl
-
-
Constructor Details
-
BrokenStoreFileCleaner
public BrokenStoreFileCleaner(int delay, int period, Stoppable stopper, org.apache.hadoop.conf.Configuration conf, HRegionServer regionServer)
-
-
Method Details
-
setEnabled
-
getEnabled
-
chore
Description copied from class:ScheduledChoreThe task to execute on each scheduled execution of the Chore- Specified by:
chorein classScheduledChore
-
cleanFileIfNeeded
private void cleanFileIfNeeded(org.apache.hadoop.fs.FileStatus file, HStore store, AtomicLong deletedFiles, AtomicLong failedDeletes) -
isCompactionResultFile
-
isCompactedFile
-
isActiveStorefile
-
validate
-
isOldEnough
-
deleteFile
private void deleteFile(org.apache.hadoop.fs.FileStatus file, HStore store, AtomicLong deletedFiles, AtomicLong failedDeletes)
-