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
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final int
static final double
static final boolean
static final int
static final long
private final AtomicBoolean
private long
private static final org.slf4j.Logger
private HRegionServer
-
Constructor Summary
ConstructorDescriptionBrokenStoreFileCleaner
(int delay, int period, Stoppable stopper, org.apache.hadoop.conf.Configuration conf, HRegionServer regionServer) -
Method Summary
Modifier and TypeMethodDescriptionvoid
chore()
The task to execute on each scheduled execution of the Choreprivate void
cleanFileIfNeeded
(org.apache.hadoop.fs.FileStatus file, HStore store, AtomicLong deletedFiles, AtomicLong failedDeletes) private void
deleteFile
(org.apache.hadoop.fs.FileStatus file, HStore store, AtomicLong deletedFiles, AtomicLong failedDeletes) boolean
private boolean
isActiveStorefile
(org.apache.hadoop.fs.FileStatus file, HStore store) private boolean
isCompactedFile
(org.apache.hadoop.fs.FileStatus file, HStore store) private boolean
isCompactionResultFile
(org.apache.hadoop.fs.FileStatus file, HStore store) (package private) boolean
isOldEnough
(org.apache.hadoop.fs.FileStatus file) boolean
setEnabled
(boolean enabled) (package private) boolean
validate
(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:ScheduledChore
The task to execute on each scheduled execution of the Chore- Specified by:
chore
in 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)
-