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
Modifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
private HMaster
private boolean
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
this method is used to pass some instance into subclass(package private) static boolean
isArchiveDataDir
(org.apache.hadoop.fs.Path path) (package private) static boolean
isArchiveNamespaceDir
(org.apache.hadoop.fs.Path path) (package private) static boolean
isArchiveTableDir
(org.apache.hadoop.fs.Path path) private boolean
isEmptyArchiveDirDeletable
(org.apache.hadoop.fs.Path dir) boolean
isEmptyDirDeletable
(org.apache.hadoop.fs.Path dir) Check if a empty directory with no subdirs or subfiles can be deletedprotected boolean
isFileDeletable
(org.apache.hadoop.fs.FileStatus fStat) Should the master delete the file or keep it?private boolean
namespaceExists
(String namespace) void
setConf
(org.apache.hadoop.conf.Configuration conf) private boolean
tableExists
(TableName tableName) Methods inherited from class org.apache.hadoop.hbase.master.cleaner.BaseHFileCleanerDelegate
isStopped, stop
Methods inherited from class org.apache.hadoop.hbase.master.cleaner.BaseFileCleanerDelegate
getDeletableFiles
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
Methods 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:FileCleanerDelegate
this method is used to pass some instance into subclass- Specified by:
init
in interfaceFileCleanerDelegate
- Overrides:
init
in classBaseFileCleanerDelegate
-
setConf
- Specified by:
setConf
in interfaceorg.apache.hadoop.conf.Configurable
- Overrides:
setConf
in classBaseConfigurable
-
isFileDeletable
Description copied from class:BaseFileCleanerDelegate
Should the master delete the file or keep it?- Specified by:
isFileDeletable
in 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:FileCleanerDelegate
Check 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
-