public final class SequenceFileDirValueIterator<V extends org.apache.hadoop.io.Writable> extends com.google.common.collect.ForwardingIterator<V> implements Closeable
SequenceFileValueIterator
, but iterates not just over one
sequence file, but many. The input path may be specified as a directory of
files to read, or as a glob pattern. The set of files may be optionally
restricted with a PathFilter
.Constructor and Description |
---|
SequenceFileDirValueIterator(org.apache.hadoop.fs.Path[] path,
Comparator<org.apache.hadoop.fs.FileStatus> ordering,
boolean reuseKeyValueInstances,
org.apache.hadoop.conf.Configuration conf)
Multifile sequence file iterator where files are specified explicitly by
path parameters.
|
SequenceFileDirValueIterator(org.apache.hadoop.fs.Path path,
PathType pathType,
org.apache.hadoop.fs.PathFilter filter,
Comparator<org.apache.hadoop.fs.FileStatus> ordering,
boolean reuseKeyValueInstances,
org.apache.hadoop.conf.Configuration conf)
Constructor that uses either
FileSystem.listStatus(Path) or
FileSystem.globStatus(Path) to obtain list of files to iterate over
(depending on pathType parameter). |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected Iterator<V> |
delegate() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEachRemaining
public SequenceFileDirValueIterator(org.apache.hadoop.fs.Path path, PathType pathType, org.apache.hadoop.fs.PathFilter filter, Comparator<org.apache.hadoop.fs.FileStatus> ordering, boolean reuseKeyValueInstances, org.apache.hadoop.conf.Configuration conf) throws IOException
FileSystem.listStatus(Path)
or
FileSystem.globStatus(Path)
to obtain list of files to iterate over
(depending on pathType parameter).IOException
public SequenceFileDirValueIterator(org.apache.hadoop.fs.Path[] path, Comparator<org.apache.hadoop.fs.FileStatus> ordering, boolean reuseKeyValueInstances, org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
protected Iterator<V> delegate()
delegate
in class com.google.common.collect.ForwardingIterator<V extends org.apache.hadoop.io.Writable>
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.