Package org.apache.hadoop.mapred.join
Class JoinRecordReader<K extends WritableComparable>
java.lang.Object
org.apache.hadoop.mapred.join.CompositeRecordReader<K,Writable,TupleWritable>
org.apache.hadoop.mapred.join.JoinRecordReader<K>
- All Implemented Interfaces:
Closeable,AutoCloseable,Comparable<ComposableRecordReader<K,,?>> Configurable,ComposableRecordReader<K,,TupleWritable> RecordReader<K,TupleWritable>
- Direct Known Subclasses:
InnerJoinRecordReader,OuterJoinRecordReader
@Public
@Stable
public abstract class JoinRecordReader<K extends WritableComparable>
extends CompositeRecordReader<K,Writable,TupleWritable>
implements ComposableRecordReader<K,TupleWritable>
Base class for Composite joins returning Tuples of arbitrary Writables.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classorg.apache.hadoop.mapred.join.JoinRecordReader.JoinDelegationIteratorSince the JoinCollector is effecting our operation, we need only provide an iterator proxy wrapping its operation. -
Field Summary
Fields inherited from class org.apache.hadoop.mapred.join.CompositeRecordReader
jc, kids -
Constructor Summary
ConstructorsConstructorDescriptionJoinRecordReader(int id, JobConf conf, int capacity, Class<? extends WritableComparator> cmpcl) -
Method Summary
Modifier and TypeMethodDescriptionCreate an object of the appropriate type to be used as a value.protected ResetableIterator<TupleWritable>Return an iterator wrapping the JoinCollector.booleannext(K key, TupleWritable value) 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.mapred.join.CompositeRecordReader
accept, add, close, combine, compareTo, createInternalValue, createKey, fillJoinCollector, getComparator, getConf, getPos, getProgress, getRecordReaderQueue, hasNext, id, key, key, setConf, skipMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface org.apache.hadoop.mapred.join.ComposableRecordReader
accept, hasNext, id, key, key, skipMethods inherited from interface org.apache.hadoop.mapred.RecordReader
close, createKey, getPos, getProgress
-
Constructor Details
-
JoinRecordReader
public JoinRecordReader(int id, JobConf conf, int capacity, Class<? extends WritableComparator> cmpcl) throws IOException - Throws:
IOException
-
-
Method Details
-
next
Emit the next set of key, value pairs as defined by the child RecordReaders and operation associated with this composite RR.- Specified by:
nextin interfaceRecordReader<K extends WritableComparable,TupleWritable> - Parameters:
key- the key to read data intovalue- the value to read data into- Returns:
- true iff a key/value was read, false if at EOF
- Throws:
IOException
-
createValue
Create an object of the appropriate type to be used as a value.- Specified by:
createValuein interfaceRecordReader<K extends WritableComparable,TupleWritable> - Returns:
- a new value object.
-
getDelegate
Return an iterator wrapping the JoinCollector.- Specified by:
getDelegatein classCompositeRecordReader<K extends WritableComparable,Writable, TupleWritable>
-