public class HDFSReader extends Object
Modifier and Type | Field and Description |
---|---|
protected org.apache.hadoop.conf.Configuration |
conf
|
protected org.apache.hadoop.fs.FileSystem |
hdfs |
Constructor and Description |
---|
HDFSReader()
Create a HDFSReader with default configuration.
|
Modifier and Type | Method and Description |
---|---|
List<org.apache.hadoop.fs.Path>
|
listSubfiles(org.apache.hadoop.fs.Path path)
If the path specifies a directory, list all the sub-files in it.
|
protected org.apache.hadoop.conf.Configuration conf
protected org.apache.hadoop.fs.FileSystem hdfs
public HDFSReader() throws IOException
IOException
- On error opening Hadoop Filesystem.
public List<org.apache.hadoop.fs.Path> listSubfiles(@Nonnull org.apache.hadoop.fs.Path path) throws IOException
path
- The path of a directory or a file.IOException
- On error reading files in Hadoop
Filesystem.