Configuration conf = getConf();
FileSystem fs = inputPath.getFileSystem(conf);
// filter input
DocumentFilter filters = DocumentFilter.getFilters(conf);
boolean doFilter = DocumentFilter.isRequired(conf);
FileStatus[] fss = fs.listStatus(inputPath);
for (FileStatus status : fss) {
Path path = status.getPath();
// skips the _log or _SUCCESS files
if (!path.getName().startsWith("part-")
&& !path.getName().equals(inputPath.getName()))
continue;
SequenceFile.Reader reader = new SequenceFile.Reader(fs, path, conf);
Text key = new Text();
BehemothDocument value = new BehemothDocument();
while (reader.next(key, value)) {
// skip this document?
if (doFilter && filters.keep(value) == false)
continue;
System.out.println(value.toString(showBinaryContent,
showAnnotations, showText, showMD));
}