org.apache.hadoop.hbase.master.cleaner
Class LogCleaner
java.lang.Object
org.apache.hadoop.hbase.util.HasThread
org.apache.hadoop.hbase.Chore
org.apache.hadoop.hbase.master.cleaner.CleanerChore<BaseLogCleanerDelegate>
org.apache.hadoop.hbase.master.cleaner.LogCleaner
- All Implemented Interfaces:
- Runnable
@InterfaceAudience.Private
public class LogCleaner
- extends CleanerChore<BaseLogCleanerDelegate>
This Chore, every time it runs, will attempt to delete the HLogs in the old logs folder. The HLog
is only deleted if none of the cleaner delegates says otherwise.
- See Also:
BaseLogCleanerDelegate
Fields inherited from class org.apache.hadoop.hbase.Chore |
stopper |
Constructor Summary |
LogCleaner(int p,
Stoppable s,
org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path oldLogDir)
|
Method Summary |
protected boolean |
validate(org.apache.hadoop.fs.Path file)
Validate the file to see if it even belongs in the 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 |
LogCleaner
public LogCleaner(int p,
Stoppable s,
org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path oldLogDir)
- Parameters:
p
- the period of time to sleep between each runs
- the stopperconf
- configuration to usefs
- handle to the FSoldLogDir
- the path to the archived logs
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<BaseLogCleanerDelegate>
- Parameters:
file
- full Path
of the file to be checked
- Returns:
- true if the file is valid, false otherwise
Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.