public static class FSUtils.BlackListDirFilter extends AbstractFileStatusFilter
Modifier and Type | Field and Description |
---|---|
private List<String> |
blacklist |
private org.apache.hadoop.fs.FileSystem |
fs |
Constructor and Description |
---|
BlackListDirFilter(org.apache.hadoop.fs.FileSystem fs,
List<String> directoryNameBlackList)
Create a filter on the givem filesystem with the specified blacklist
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
accept(org.apache.hadoop.fs.Path p,
Boolean isDir)
Filters out a path.
|
protected boolean |
isValidName(String name) |
accept, accept, isDirectory, isFile
private final org.apache.hadoop.fs.FileSystem fs
public BlackListDirFilter(org.apache.hadoop.fs.FileSystem fs, List<String> directoryNameBlackList)
fs
- filesystem to filterdirectoryNameBlackList
- list of the names of the directories to filter. If
null, all directories are returnedprotected boolean accept(org.apache.hadoop.fs.Path p, @CheckForNull Boolean isDir)
AbstractFileStatusFilter
accept
in class AbstractFileStatusFilter
p
- A filesystem pathisDir
- An optional boolean indicating whether the path is a directory or notprotected boolean isValidName(String name)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.