org.apache.tez.runtime.library.common
Class ValuesIterator<KEY,VALUE>
java.lang.Object
org.apache.tez.runtime.library.common.ValuesIterator<KEY,VALUE>
public class ValuesIterator<KEY,VALUE>
- extends Object
Iterates values while keys match in sorted input.
This class is not thread safe. Accessing methods from multiple threads will
lead to corrupt data.
|
Constructor Summary |
ValuesIterator(TezRawKeyValueIterator in,
org.apache.hadoop.io.RawComparator<KEY> comparator,
Class<KEY> keyClass,
Class<VALUE> valClass,
org.apache.hadoop.conf.Configuration conf,
org.apache.tez.common.counters.TezCounter inputKeyCounter,
org.apache.tez.common.counters.TezCounter inputValueCounter)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
in
protected TezRawKeyValueIterator in
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.tez.common.counters.TezCounter inputKeyCounter,
org.apache.tez.common.counters.TezCounter inputValueCounter)
throws IOException
- Throws:
IOException
moveToNext
public boolean moveToNext()
throws IOException
- Move to the next K-Vs pair
- Returns:
- true if another pair exists, otherwise false.
- Throws:
IOException
getKey
public KEY getKey()
- The current key.
getValues
public Iterable<VALUE> getValues()
Copyright © 2014 Apache Software Foundation. All rights reserved.