org.apache.tez.runtime.library.common.task.impl
Class ValuesIterator<KEY,VALUE>
java.lang.Object
org.apache.tez.runtime.library.common.task.impl.ValuesIterator<KEY,VALUE>
- All Implemented Interfaces:
- Iterator<VALUE>
public class ValuesIterator<KEY,VALUE>
- extends Object
- implements Iterator<VALUE>
Iterates values while keys match in sorted input.
Usage: Call moveToNext to move to the next k, v pair. This returns true if another exists,
followed by getKey() and getValues() to get the current key and list of values.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
in
protected TezRawKeyValueIterator in
reporter
protected org.apache.hadoop.util.Progressable reporter
ValuesIterator
public ValuesIterator(TezRawKeyValueIterator in,
org.apache.hadoop.io.RawComparator<KEY> comparator,
Class<KEY> keyClass,
Class<VALUE> valClass,
org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.util.Progressable reporter)
throws IOException
- Throws:
IOException
hasNext
public boolean hasNext()
- Specified by:
hasNext in interface Iterator<VALUE>
next
public VALUE next()
- Specified by:
next in interface Iterator<VALUE>
remove
public void remove()
- Specified by:
remove in interface Iterator<VALUE>
nextKey
public void nextKey()
throws IOException
- Start processing next unique key.
- Throws:
IOException
more
public boolean more()
- True iff more keys remain.
getKey
public KEY getKey()
- The current key.
Copyright © 2014 Apache Software Foundation. All rights reserved.