org.apache.hadoop.hbase.master.cleaner
Class HFileCleaner
java.lang.Object
org.apache.hadoop.hbase.util.HasThread
org.apache.hadoop.hbase.Chore
org.apache.hadoop.hbase.master.cleaner.CleanerChore<BaseHFileCleanerDelegate>
org.apache.hadoop.hbase.master.cleaner.HFileCleaner
- All Implemented Interfaces:
- Runnable
@InterfaceAudience.Private
public class HFileCleaner
- extends CleanerChore<BaseHFileCleanerDelegate>
This Chore, every time it runs, will clear the HFiles in the hfile archive
folder that are deletable for each HFile cleaner in the chain.
Fields inherited from class org.apache.hadoop.hbase.Chore |
stopper |
Constructor Summary |
HFileCleaner(int period,
Stoppable stopper,
org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path directory)
|
Methods inherited from class org.apache.hadoop.hbase.util.HasThread |
getName, getThread, interrupt, isAlive, isInterrupted, join, join, join, setDaemon, setName, setPriority, setUncaughtExceptionHandler, start |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MASTER_HFILE_CLEANER_PLUGINS
public static final String MASTER_HFILE_CLEANER_PLUGINS
- See Also:
- Constant Field Values
HFileCleaner
public HFileCleaner(int period,
Stoppable stopper,
org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path directory)
- Parameters:
period
- the period of time to sleep between each runstopper
- the stopperconf
- configuration to usefs
- handle to the FSdirectory
- directory to be cleaned
validate
protected boolean validate(org.apache.hadoop.fs.Path file)
- Description copied from class:
CleanerChore
- Validate the file to see if it even belongs in the directory. If it is valid, then the file
will go through the cleaner delegates, but otherwise the file is just deleted.
- Specified by:
validate
in class CleanerChore<BaseHFileCleanerDelegate>
- Parameters:
file
- full Path
of the file to be checked
- Returns:
- true if the file is valid, false otherwise
getDelegatesForTesting
public List<BaseHFileCleanerDelegate> getDelegatesForTesting()
- Exposed for TESTING!
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.