Interface KeyValueIterator<K,V>
public interface KeyValueIterator<K,V>
An internal iterator interface which presents a more restrictive API than
Iterator. This
iterator can avoid using Tuple2 to wrap key and value.-
Method Details
-
advanceNext
Advance this iterator by a single kv. Returnsfalseif this iterator has no more kvs andtrueotherwise. If this returnstrue, then the new kv can be retrieved by callinggetKey()andgetValue().- Throws:
IOException
-
getKey
K getKey()Retrieve the key from this iterator. This method is idempotent. It is illegal to call this method afteradvanceNext()has returnedfalse. -
getValue
V getValue()Retrieve the value from this iterator. This method is idempotent. It is illegal to call this method afteradvanceNext()has returnedfalse.
-