org.apache.mahout.common.iterator.sequencefile
Class SequenceFileIterator<K extends org.apache.hadoop.io.Writable,V extends org.apache.hadoop.io.Writable>
java.lang.Object
com.google.common.collect.UnmodifiableIterator<T>
com.google.common.collect.AbstractIterator<Pair<K,V>>
org.apache.mahout.common.iterator.sequencefile.SequenceFileIterator<K,V>
- All Implemented Interfaces:
- Closeable, Iterator<Pair<K,V>>
public final class SequenceFileIterator<K extends org.apache.hadoop.io.Writable,V extends org.apache.hadoop.io.Writable>
- extends com.google.common.collect.AbstractIterator<Pair<K,V>>
- implements Closeable
Iterator
over a SequenceFile
's keys and values, as a Pair
containing key and value.
Constructor Summary |
SequenceFileIterator(org.apache.hadoop.fs.Path path,
boolean reuseKeyValueInstances,
org.apache.hadoop.conf.Configuration conf)
|
Methods inherited from class com.google.common.collect.AbstractIterator |
endOfData, hasNext, next, peek |
Methods inherited from class com.google.common.collect.UnmodifiableIterator |
remove |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SequenceFileIterator
public SequenceFileIterator(org.apache.hadoop.fs.Path path,
boolean reuseKeyValueInstances,
org.apache.hadoop.conf.Configuration conf)
throws IOException
- Throws:
IOException
- if path can't be read, or its key or value class can't be instantiated
getKeyClass
public Class<K> getKeyClass()
getValueClass
public Class<V> getValueClass()
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Throws:
IOException
computeNext
protected Pair<K,V> computeNext()
- Specified by:
computeNext
in class com.google.common.collect.AbstractIterator<Pair<K extends org.apache.hadoop.io.Writable,V extends org.apache.hadoop.io.Writable>>
Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.