org.apache.tez.runtime.library.common
Class ValuesIterator<KEY,VALUE>

java.lang.Object
  extended by 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.


Field Summary
protected  TezRawKeyValueIterator in
           
 
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)
           
 
Method Summary
 KEY getKey()
          The current key.
 Iterable<VALUE> getValues()
           
 boolean moveToNext()
          Move to the next K-Vs pair
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

in

protected TezRawKeyValueIterator in
Constructor Detail

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
Method Detail

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.