@InterfaceAudience.Private public class BrokenStoreFileCleaner extends ScheduledChore
Modifier and Type | Field and Description |
---|---|
static String |
BROKEN_STOREFILE_CLEANER_DELAY |
static String |
BROKEN_STOREFILE_CLEANER_DELAY_JITTER |
static String |
BROKEN_STOREFILE_CLEANER_ENABLED |
static String |
BROKEN_STOREFILE_CLEANER_PERIOD |
static String |
BROKEN_STOREFILE_CLEANER_TTL |
static int |
DEFAULT_BROKEN_STOREFILE_CLEANER_DELAY |
static double |
DEFAULT_BROKEN_STOREFILE_CLEANER_DELAY_JITTER |
static boolean |
DEFAULT_BROKEN_STOREFILE_CLEANER_ENABLED |
static int |
DEFAULT_BROKEN_STOREFILE_CLEANER_PERIOD |
static long |
DEFAULT_BROKEN_STOREFILE_CLEANER_TTL |
private AtomicBoolean |
enabled |
private long |
fileTtl |
private static org.slf4j.Logger |
LOG |
private HRegionServer |
regionServer |
Constructor and Description |
---|
BrokenStoreFileCleaner(int delay,
int period,
Stoppable stopper,
org.apache.hadoop.conf.Configuration conf,
HRegionServer regionServer) |
Modifier and Type | Method and Description |
---|---|
void |
chore()
The task to execute on each scheduled execution of the Chore
|
private 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 |
getEnabled() |
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) |
cancel, cancel, choreForTesting, cleanup, getInitialDelay, getName, getPeriod, getStopper, getTimeUnit, initialChore, isInitialChoreComplete, isScheduled, run, shutdown, shutdown, toString, triggerNow
private static final org.slf4j.Logger LOG
public static final String BROKEN_STOREFILE_CLEANER_ENABLED
public static final boolean DEFAULT_BROKEN_STOREFILE_CLEANER_ENABLED
public static final String BROKEN_STOREFILE_CLEANER_TTL
public static final long DEFAULT_BROKEN_STOREFILE_CLEANER_TTL
public static final String BROKEN_STOREFILE_CLEANER_DELAY
public static final int DEFAULT_BROKEN_STOREFILE_CLEANER_DELAY
public static final String BROKEN_STOREFILE_CLEANER_DELAY_JITTER
public static final double DEFAULT_BROKEN_STOREFILE_CLEANER_DELAY_JITTER
public static final String BROKEN_STOREFILE_CLEANER_PERIOD
public static final int DEFAULT_BROKEN_STOREFILE_CLEANER_PERIOD
private HRegionServer regionServer
private final AtomicBoolean enabled
private long fileTtl
public BrokenStoreFileCleaner(int delay, int period, Stoppable stopper, org.apache.hadoop.conf.Configuration conf, HRegionServer regionServer)
public boolean setEnabled(boolean enabled)
public boolean getEnabled()
public void chore()
ScheduledChore
chore
in class ScheduledChore
private void cleanFileIfNeeded(org.apache.hadoop.fs.FileStatus file, HStore store, AtomicLong deletedFiles, AtomicLong failedDeletes)
private boolean isCompactionResultFile(org.apache.hadoop.fs.FileStatus file, HStore store)
private boolean isCompactedFile(org.apache.hadoop.fs.FileStatus file, HStore store)
private boolean isActiveStorefile(org.apache.hadoop.fs.FileStatus file, HStore store)
boolean validate(org.apache.hadoop.fs.Path file)
boolean isOldEnough(org.apache.hadoop.fs.FileStatus file)
private void deleteFile(org.apache.hadoop.fs.FileStatus file, HStore store, AtomicLong deletedFiles, AtomicLong failedDeletes)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.