T- Cleaner delegate class that is dynamically loaded from configuration
public abstract class CleanerChore<T extends FileCleanerDelegate> extends Chore
|Constructor and Description|
|Modifier and Type||Method and Description|
Look for chores.
Called when the chore has completed, allowing subclasses to cleanup any extra overhead
Validate the file to see if it even belongs in the directory.
choreForTesting, getPeriod, getSleeper, getStopper, initialChore, run, sleep, triggerNow
getName, getThread, interrupt, isAlive, isInterrupted, join, join, join, setDaemon, setName, setPriority, setUncaughtExceptionHandler, start
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 run
sleepPeriod- the period of time to sleep between each run
s- the stopper
conf- configuration to use
fs- handle to the FS
oldFileDir- the path to the archived files
confKey- configuration key for the classes to instantiate
protected abstract boolean validate(org.apache.hadoop.fs.Path file)
Pathof the file to be checked
protected void chore()
Copyright © 2015 The Apache Software Foundation. All rights reserved.