Class SnapshotScannerHDFSAclCleaner
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.security.access.SnapshotScannerHDFSAclCleaner
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable,FileCleanerDelegate,Stoppable
@LimitedPrivate("Configuration")
@Evolving
public class SnapshotScannerHDFSAclCleaner
extends BaseHFileCleanerDelegate
Implementation of a file cleaner that checks if a empty directory with no subdirs and subfiles is
deletable when user scan snapshot feature is enabled
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Loggerprivate HMasterprivate boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidthis method is used to pass some instance into subclass(package private) static booleanisArchiveDataDir(org.apache.hadoop.fs.Path path) (package private) static booleanisArchiveNamespaceDir(org.apache.hadoop.fs.Path path) (package private) static booleanisArchiveTableDir(org.apache.hadoop.fs.Path path) private booleanisEmptyArchiveDirDeletable(org.apache.hadoop.fs.Path dir) booleanisEmptyDirDeletable(org.apache.hadoop.fs.Path dir) Check if a empty directory with no subdirs or subfiles can be deletedprotected booleanisFileDeletable(org.apache.hadoop.fs.FileStatus fStat) Should the master delete the file or keep it?private booleannamespaceExists(String namespace) voidsetConf(org.apache.hadoop.conf.Configuration conf) private booleantableExists(TableName tableName) Methods inherited from class org.apache.hadoop.hbase.master.cleaner.BaseHFileCleanerDelegate
isStopped, stopMethods inherited from class org.apache.hadoop.hbase.master.cleaner.BaseFileCleanerDelegate
getDeletableFilesMethods 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
postClean, preClean
-
Field Details
-
LOG
-
master
-
userScanSnapshotEnabled
-
-
Constructor Details
-
SnapshotScannerHDFSAclCleaner
public SnapshotScannerHDFSAclCleaner()
-
-
Method Details
-
init
Description copied from interface:FileCleanerDelegatethis method is used to pass some instance into subclass- Specified by:
initin interfaceFileCleanerDelegate- Overrides:
initin classBaseFileCleanerDelegate
-
setConf
- Specified by:
setConfin interfaceorg.apache.hadoop.conf.Configurable- Overrides:
setConfin classBaseConfigurable
-
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
-
isEmptyDirDeletable
Description copied from interface:FileCleanerDelegateCheck if a empty directory with no subdirs or subfiles can be deleted- Parameters:
dir- Path of the directory- Returns:
- True if the directory can be deleted, otherwise false
-
isEmptyArchiveDirDeletable
-
isArchiveDataDir
-
isArchiveNamespaceDir
-
isArchiveTableDir
-
namespaceExists
- Throws:
IOException
-
tableExists
- Throws:
IOException
-