org.apache.hadoop.mapreduce.lib.join
Class JoinRecordReader<K extends WritableComparable<?>>

java.lang.Object
  extended by org.apache.hadoop.mapreduce.RecordReader<K,V>
      extended by org.apache.hadoop.mapreduce.lib.join.ComposableRecordReader<K,X>
          extended by org.apache.hadoop.mapreduce.lib.join.CompositeRecordReader<K,Writable,TupleWritable>
              extended by org.apache.hadoop.mapreduce.lib.join.JoinRecordReader<K>
All Implemented Interfaces:
Closeable, Comparable<ComposableRecordReader<K,?>>, Configurable
Direct Known Subclasses:
InnerJoinRecordReader, OuterJoinRecordReader

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract class JoinRecordReader<K extends WritableComparable<?>>
extends CompositeRecordReader<K,Writable,TupleWritable>

Base class for Composite joins returning Tuples of arbitrary Writables.


Field Summary
 
Fields inherited from class org.apache.hadoop.mapreduce.lib.join.CompositeRecordReader
conf, jc, key, keyclass, kids, value
 
Constructor Summary
JoinRecordReader(int id, Configuration conf, int capacity, Class<? extends WritableComparator> cmpcl)
           
 
Method Summary
 TupleWritable createValue()
          Create instance of value.
protected  ResetableIterator<TupleWritable> getDelegate()
          Return an iterator wrapping the JoinCollector.
 boolean nextKeyValue()
          Emit the next set of key, value pairs as defined by the child RecordReaders and operation associated with this composite RR.
 
Methods inherited from class org.apache.hadoop.mapreduce.lib.join.CompositeRecordReader
accept, add, close, combine, compareTo, createKey, createTupleWritable, fillJoinCollector, getComparator, getConf, getCurrentKey, getCurrentValue, getProgress, getRecordReaderQueue, hasNext, id, initialize, key, key, setConf, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JoinRecordReader

public JoinRecordReader(int id,
                        Configuration conf,
                        int capacity,
                        Class<? extends WritableComparator> cmpcl)
                 throws IOException
Throws:
IOException
Method Detail

nextKeyValue

public boolean nextKeyValue()
                     throws IOException,
                            InterruptedException
Emit the next set of key, value pairs as defined by the child RecordReaders and operation associated with this composite RR.

Specified by:
nextKeyValue in class RecordReader<K extends WritableComparable<?>,TupleWritable>
Returns:
true if a key/value pair was read
Throws:
IOException
InterruptedException

createValue

public TupleWritable createValue()
Description copied from class: ComposableRecordReader
Create instance of value.


getDelegate

protected ResetableIterator<TupleWritable> getDelegate()
Return an iterator wrapping the JoinCollector.

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


Copyright © 2012 Apache Software Foundation. All Rights Reserved.