org.apache.hadoop.mapred.join
Interface ComposableRecordReader<K extends WritableComparable,V extends Writable>

All Superinterfaces:
Comparable<ComposableRecordReader<K,?>>, RecordReader<K,V>
All Known Implementing Classes:
InnerJoinRecordReader, JoinRecordReader, MultiFilterRecordReader, OuterJoinRecordReader, OverrideRecordReader, WrappedRecordReader

@InterfaceAudience.Public
@InterfaceStability.Stable
public interface ComposableRecordReader<K extends WritableComparable,V extends Writable>
extends RecordReader<K,V>, Comparable<ComposableRecordReader<K,?>>

Additional operations required of a RecordReader to participate in a join.


Method Summary
 void accept(org.apache.hadoop.mapred.join.CompositeRecordReader.JoinCollector jc, K key)
          While key-value pairs from this RecordReader match the given key, register them with the JoinCollector provided.
 boolean hasNext()
          Returns true if the stream is not empty, but provides no guarantee that a call to next(K,V) will succeed.
 int id()
          Return the position in the collector this class occupies.
 K key()
          Return the key this RecordReader would supply on a call to next(K,V)
 void key(K key)
          Clone the key at the head of this RecordReader into the object provided.
 void skip(K key)
          Skip key-value pairs with keys less than or equal to the key provided.
 
Methods inherited from interface org.apache.hadoop.mapred.RecordReader
close, createKey, createValue, getPos, getProgress, next
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

id

int id()
Return the position in the collector this class occupies.


key

K key()
Return the key this RecordReader would supply on a call to next(K,V)


key

void key(K key)
         throws IOException
Clone the key at the head of this RecordReader into the object provided.

Throws:
IOException

hasNext

boolean hasNext()
Returns true if the stream is not empty, but provides no guarantee that a call to next(K,V) will succeed.


skip

void skip(K key)
          throws IOException
Skip key-value pairs with keys less than or equal to the key provided.

Throws:
IOException

accept

void accept(org.apache.hadoop.mapred.join.CompositeRecordReader.JoinCollector jc,
            K key)
            throws IOException
While key-value pairs from this RecordReader match the given key, register them with the JoinCollector provided.

Throws:
IOException


Copyright © 2012 Apache Software Foundation. All Rights Reserved.