T - Cleaner delegate class that is dynamically loaded from configurationpublic abstract class CleanerChore<T extends FileCleanerDelegate> extends Chore
| Modifier and Type | Field and Description |
|---|---|
protected List<T> |
cleanersChain |
| Constructor and Description |
|---|
CleanerChore(String name,
int sleepPeriod,
Stoppable s,
org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path oldFileDir,
String confKey) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
chore()
Look for chores.
|
void |
cleanup()
Called when the chore has completed, allowing subclasses to cleanup any
extra overhead
|
protected abstract boolean |
validate(org.apache.hadoop.fs.Path file)
Validate the file to see if it even belongs in the directory.
|
choreForTesting, initialChore, run, sleep, triggerNowgetName, getThread, interrupt, isAlive, isInterrupted, join, join, join, setDaemon, setName, setPriority, setUncaughtExceptionHandler, startprotected List<T extends FileCleanerDelegate> cleanersChain
public CleanerChore(String name, int sleepPeriod, Stoppable s, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path oldFileDir, String confKey)
name - name of the chore being runsleepPeriod - the period of time to sleep between each runs - the stopperconf - configuration to usefs - handle to the FSoldFileDir - the path to the archived filesconfKey - configuration key for the classes to instantiateprotected abstract boolean validate(org.apache.hadoop.fs.Path file)
file - full Path of the file to be checkedprotected void chore()
ChoreCopyright © 2014 The Apache Software Foundation. All rights reserved.