@InterfaceAudience.Private public class HFileCleaner extends CleanerChore<BaseHFileCleanerDelegate> implements ConfigurationObserver
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_HFILE_DELETE_THROTTLE_THRESHOLD |
static int |
DEFAULT_LARGE_HFILE_DELETE_THREAD_NUMBER |
static int |
DEFAULT_LARGE_HFILE_QUEUE_INIT_SIZE |
static int |
DEFAULT_SMALL_HFILE_DELETE_THREAD_NUMBER |
static int |
DEFAULT_SMALL_HFILE_QUEUE_INIT_SIZE |
static String |
HFILE_DELETE_THREAD_CHECK_INTERVAL_MSEC |
static String |
HFILE_DELETE_THREAD_TIMEOUT_MSEC |
static String |
HFILE_DELETE_THROTTLE_THRESHOLD |
static String |
LARGE_HFILE_DELETE_THREAD_NUMBER |
static String |
LARGE_HFILE_QUEUE_INIT_SIZE |
static String |
MASTER_HFILE_CLEANER_PLUGINS |
static String |
SMALL_HFILE_DELETE_THREAD_NUMBER |
static String |
SMALL_HFILE_QUEUE_INIT_SIZE |
CHORE_POOL_SIZE, cleanersChain, fs, params| Constructor and Description |
|---|
HFileCleaner(int period,
Stoppable stopper,
org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path directory,
DirScanPool pool) |
HFileCleaner(int period,
Stoppable stopper,
org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path directory,
DirScanPool pool,
Map<String,Object> params) |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup()
Override to run cleanup tasks when the Chore encounters an error and must stop running
|
protected void |
consumerLoop(BlockingQueue<org.apache.hadoop.hbase.master.cleaner.HFileCleaner.HFileDeleteTask> queue) |
int |
deleteFiles(Iterable<org.apache.hadoop.fs.FileStatus> filesToDelete)
Delete the given files
|
List<Thread> |
getCleanerThreads() |
List<BaseHFileCleanerDelegate> |
getDelegatesForTesting()
Exposed for TESTING!
|
long |
getLargeQueueInitSize() |
long |
getNumOfDeletedLargeFiles() |
long |
getNumOfDeletedSmallFiles() |
long |
getSmallQueueInitSize() |
long |
getThrottlePoint() |
void |
onConfigurationChange(org.apache.hadoop.conf.Configuration conf)
This method would be called by the
ConfigurationManager
object when the Configuration object is reloaded from disk. |
protected boolean |
validate(org.apache.hadoop.fs.Path file)
Validate the file to see if it even belongs in the directory.
|
chore, getEnabled, runCleaner, setEnabledcancel, cancel, choreForTesting, getInitialDelay, getName, getPeriod, getStopper, getTimeUnit, initialChore, isInitialChoreComplete, isScheduled, run, toString, triggerNowpublic static final String MASTER_HFILE_CLEANER_PLUGINS
public static final String HFILE_DELETE_THROTTLE_THRESHOLD
public static final int DEFAULT_HFILE_DELETE_THROTTLE_THRESHOLD
public static final String LARGE_HFILE_QUEUE_INIT_SIZE
public static final int DEFAULT_LARGE_HFILE_QUEUE_INIT_SIZE
public static final String SMALL_HFILE_QUEUE_INIT_SIZE
public static final int DEFAULT_SMALL_HFILE_QUEUE_INIT_SIZE
public static final String LARGE_HFILE_DELETE_THREAD_NUMBER
public static final int DEFAULT_LARGE_HFILE_DELETE_THREAD_NUMBER
public static final String SMALL_HFILE_DELETE_THREAD_NUMBER
public static final int DEFAULT_SMALL_HFILE_DELETE_THREAD_NUMBER
public static final String HFILE_DELETE_THREAD_TIMEOUT_MSEC
public static final String HFILE_DELETE_THREAD_CHECK_INTERVAL_MSEC
public HFileCleaner(int period,
Stoppable stopper,
org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path directory,
DirScanPool pool)
public HFileCleaner(int period,
Stoppable stopper,
org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path directory,
DirScanPool pool,
Map<String,Object> params)
period - the period of time to sleep between each runstopper - the stopperconf - configuration to usefs - handle to the FSdirectory - directory to be cleanedparams - params could be used in subclass of BaseHFileCleanerDelegateprotected boolean validate(org.apache.hadoop.fs.Path file)
CleanerChorevalidate in class CleanerChore<BaseHFileCleanerDelegate>file - full Path of the file to be checkedpublic List<BaseHFileCleanerDelegate> getDelegatesForTesting()
public int deleteFiles(Iterable<org.apache.hadoop.fs.FileStatus> filesToDelete)
CleanerChoredeleteFiles in class CleanerChore<BaseHFileCleanerDelegate>filesToDelete - files to deletepublic void cleanup()
ScheduledChorecleanup in class CleanerChore<BaseHFileCleanerDelegate>protected void consumerLoop(BlockingQueue<org.apache.hadoop.hbase.master.cleaner.HFileCleaner.HFileDeleteTask> queue)
public long getNumOfDeletedLargeFiles()
public long getNumOfDeletedSmallFiles()
public long getLargeQueueInitSize()
public long getSmallQueueInitSize()
public long getThrottlePoint()
public void onConfigurationChange(org.apache.hadoop.conf.Configuration conf)
ConfigurationObserverConfigurationManager
object when the Configuration object is reloaded from disk.onConfigurationChange in interface ConfigurationObserverCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.