org.apache.hadoop.fs.http.server
Class FSOperations.FSListStatus
java.lang.Object
org.apache.hadoop.fs.http.server.FSOperations.FSListStatus
- All Implemented Interfaces:
- org.apache.hadoop.fs.PathFilter, FileSystemAccess.FileSystemExecutor<Map>
- Enclosing class:
- FSOperations
@InterfaceAudience.Private
public static class FSOperations.FSListStatus
- extends Object
- implements FileSystemAccess.FileSystemExecutor<Map>, org.apache.hadoop.fs.PathFilter
Executor that performs a list-status FileSystemAccess files system operation.
Method Summary |
boolean |
accept(org.apache.hadoop.fs.Path path)
|
Map |
execute(org.apache.hadoop.fs.FileSystem fs)
Returns data for a JSON Map containing the information for
the set of files in 'path' that match 'filter'. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FSOperations.FSListStatus
public FSOperations.FSListStatus(String path,
String filter)
throws IOException
- Creates a list-status executor.
- Parameters:
path
- the directory to retrieve the status of its contents.filter
- glob filter to use.
- Throws:
IOException
- thrown if the filter expression is incorrect.
execute
public Map execute(org.apache.hadoop.fs.FileSystem fs)
throws IOException
- Returns data for a JSON Map containing the information for
the set of files in 'path' that match 'filter'.
- Specified by:
execute
in interface FileSystemAccess.FileSystemExecutor<Map>
- Parameters:
fs
- filesystem instance to use.
- Returns:
- a Map with the file status of the directory
contents that match the filter
- Throws:
IOException
- thrown if an IO error occurred.
accept
public boolean accept(org.apache.hadoop.fs.Path path)
- Specified by:
accept
in interface org.apache.hadoop.fs.PathFilter
Copyright © 2014 Apache Software Foundation. All Rights Reserved.