Class HFileLinkCleaner
java.lang.Object
org.apache.hadoop.hbase.BaseConfigurable
org.apache.hadoop.hbase.master.cleaner.BaseFileCleanerDelegate
org.apache.hadoop.hbase.master.cleaner.BaseHFileCleanerDelegate
org.apache.hadoop.hbase.master.cleaner.HFileLinkCleaner
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable,FileCleanerDelegate,Stoppable
HFileLink cleaner that determines if a hfile should be deleted. HFiles can be deleted only if
there're no links to them. When a HFileLink is created a back reference file is created in:
/hbase/archive/table/region/cf/.links-hfile/ref-region.ref-table To check if the hfile can be
deleted the back references folder must be empty.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.apache.hadoop.fs.FileSystemprivate ReentrantReadWriteLockprivate static final org.slf4j.Logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisFileDeletable(org.apache.hadoop.fs.FileStatus fStat) Should the master delete the file or keep it?voidsetConf(org.apache.hadoop.conf.Configuration conf) Methods inherited from class org.apache.hadoop.hbase.master.cleaner.BaseHFileCleanerDelegate
isStopped, stopMethods inherited from class org.apache.hadoop.hbase.master.cleaner.BaseFileCleanerDelegate
getDeletableFiles, initMethods inherited from class org.apache.hadoop.hbase.BaseConfigurable
getConfMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.conf.Configurable
getConfMethods inherited from interface org.apache.hadoop.hbase.master.cleaner.FileCleanerDelegate
isEmptyDirDeletable, postClean, preClean
-
Field Details
-
LOG
-
fs
-
lock
-
-
Constructor Details
-
HFileLinkCleaner
public HFileLinkCleaner()
-
-
Method Details
-
isFileDeletable
Description copied from class:BaseFileCleanerDelegateShould the master delete the file or keep it?- Specified by:
isFileDeletablein classBaseFileCleanerDelegate- Parameters:
fStat- file status of the file to check- Returns:
- true if the file is deletable, false if not
-
setConf
- Specified by:
setConfin interfaceorg.apache.hadoop.conf.Configurable- Overrides:
setConfin classBaseConfigurable
-