org.apache.hadoop.hbase.master.snapshot
Class SnapshotHFileCleaner
java.lang.Object
org.apache.hadoop.hbase.BaseConfigurable
org.apache.hadoop.hbase.master.cleaner.BaseHFileCleanerDelegate
org.apache.hadoop.hbase.master.snapshot.SnapshotHFileCleaner
- All Implemented Interfaces:
- org.apache.hadoop.conf.Configurable, FileCleanerDelegate, Stoppable
@InterfaceAudience.Private
@InterfaceStability.Evolving
public class SnapshotHFileCleaner
- extends BaseHFileCleanerDelegate
Implementation of a file cleaner that checks if a hfile is still used by snapshots of HBase
tables.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.hadoop.conf.Configurable |
getConf |
HFILE_CACHE_REFRESH_PERIOD_CONF_KEY
public static final String HFILE_CACHE_REFRESH_PERIOD_CONF_KEY
- Conf key for the frequency to attempt to refresh the cache of hfiles currently used in
snapshots (ms)
- See Also:
- Constant Field Values
SnapshotHFileCleaner
public SnapshotHFileCleaner()
isFileDeletable
public boolean isFileDeletable(org.apache.hadoop.fs.FileStatus fStat)
- Description copied from interface:
FileCleanerDelegate
- Should the master delete the file or keep it?
- Parameters:
fStat
- file status of the file to check
- Returns:
- true if the file is deletable, false if not
setConf
public void setConf(org.apache.hadoop.conf.Configuration conf)
- Specified by:
setConf
in interface org.apache.hadoop.conf.Configurable
- Overrides:
setConf
in class BaseConfigurable
stop
public void stop(String why)
- Description copied from interface:
Stoppable
- Stop this service.
- Specified by:
stop
in interface Stoppable
- Overrides:
stop
in class BaseHFileCleanerDelegate
- Parameters:
why
- Why we're stopping.
isStopped
public boolean isStopped()
- Specified by:
isStopped
in interface Stoppable
- Overrides:
isStopped
in class BaseHFileCleanerDelegate
- Returns:
- True if
Stoppable.stop(String)
has been closed.
getFileCacheForTesting
public SnapshotFileCache getFileCacheForTesting()
- Exposed for Testing!
- Returns:
- the cache of all hfiles
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.