org.apache.hadoop.mapred.join
Class InnerJoinRecordReader<K extends WritableComparable>

java.lang.Object
  extended by org.apache.hadoop.mapred.join.CompositeRecordReader<K,Writable,TupleWritable>
      extended by org.apache.hadoop.mapred.join.JoinRecordReader<K>
          extended by org.apache.hadoop.mapred.join.InnerJoinRecordReader<K>
All Implemented Interfaces:
Configurable

public class InnerJoinRecordReader<K extends WritableComparable>
extends JoinRecordReader<K>

Full inner join.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.mapred.join.JoinRecordReader
JoinRecordReader.JoinDelegationIterator
 
Field Summary
 
Fields inherited from class org.apache.hadoop.mapred.join.CompositeRecordReader
jc, kids
 
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.
protected  boolean combine(Object[] srcs, TupleWritable dst)
          Return true iff the tuple is full (all data sources contain this key).
 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 class org.apache.hadoop.mapred.join.JoinRecordReader
createValue, getDelegate, next
 
Methods inherited from class org.apache.hadoop.mapred.join.CompositeRecordReader
accept, add, close, compareTo, createInternalValue, createKey, fillJoinCollector, getComparator, getConf, getPos, getProgress, getRecordReaderQueue, hasNext, id, key, key, setConf, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.hadoop.mapred.RecordReader
close, createKey, getPos, getProgress
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

combine

protected boolean combine(Object[] srcs,
                          TupleWritable dst)
Return true iff the tuple is full (all data sources contain this key).

Specified by:
combine in class CompositeRecordReader<K extends WritableComparable,Writable,TupleWritable>

id

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


key

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


key

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

Throws:
IOException

hasNext

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


skip

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

Throws:
IOException

accept

public 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 © 2006 The Apache Software Foundation