|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.BaseConfigurable
org.apache.hadoop.hbase.master.cleaner.BaseFileCleanerDelegate
org.apache.hadoop.hbase.master.cleaner.BaseHFileCleanerDelegate
org.apache.hadoop.hbase.master.snapshot.SnapshotHFileCleaner
@InterfaceAudience.Private @InterfaceStability.Evolving public class SnapshotHFileCleaner
Implementation of a file cleaner that checks if a hfile is still used by snapshots of HBase tables.
Field Summary | |
---|---|
static 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) |
Constructor Summary | |
---|---|
SnapshotHFileCleaner()
|
Method Summary | |
---|---|
Iterable<org.apache.hadoop.fs.FileStatus> |
getDeletableFiles(Iterable<org.apache.hadoop.fs.FileStatus> files)
Determines which of the given files are safe to delete |
SnapshotFileCache |
getFileCacheForTesting()
Exposed for Testing! |
protected boolean |
isFileDeletable(org.apache.hadoop.fs.FileStatus fStat)
Should the master delete the file or keep it? |
boolean |
isStopped()
|
void |
setConf(org.apache.hadoop.conf.Configuration conf)
|
void |
stop(String why)
Stop this service. |
Methods inherited from class org.apache.hadoop.hbase.BaseConfigurable |
---|
getConf |
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 |
Field Detail |
---|
public static final String HFILE_CACHE_REFRESH_PERIOD_CONF_KEY
Constructor Detail |
---|
public SnapshotHFileCleaner()
Method Detail |
---|
public Iterable<org.apache.hadoop.fs.FileStatus> getDeletableFiles(Iterable<org.apache.hadoop.fs.FileStatus> files)
FileCleanerDelegate
getDeletableFiles
in interface FileCleanerDelegate
getDeletableFiles
in class BaseFileCleanerDelegate
files
- files to check for deletion
protected boolean isFileDeletable(org.apache.hadoop.fs.FileStatus fStat)
BaseFileCleanerDelegate
isFileDeletable
in class BaseFileCleanerDelegate
fStat
- file status of the file to check
public void setConf(org.apache.hadoop.conf.Configuration conf)
setConf
in interface org.apache.hadoop.conf.Configurable
setConf
in class BaseConfigurable
public void stop(String why)
Stoppable
stop
in interface Stoppable
stop
in class BaseHFileCleanerDelegate
why
- Why we're stopping.public boolean isStopped()
isStopped
in interface Stoppable
isStopped
in class BaseHFileCleanerDelegate
Stoppable.stop(String)
has been closed.public SnapshotFileCache getFileCacheForTesting()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |