Package org.apache.hadoop.mapred.join
Class MultiFilterRecordReader<K extends WritableComparable,V extends Writable>
java.lang.Object
org.apache.hadoop.mapred.join.CompositeRecordReader<K,V,V>
org.apache.hadoop.mapred.join.MultiFilterRecordReader<K,V>
- All Implemented Interfaces:
Closeable,AutoCloseable,Comparable<ComposableRecordReader<K,,?>> Configurable,ComposableRecordReader<K,,V> RecordReader<K,V>
- Direct Known Subclasses:
OverrideRecordReader
@Public
@Stable
public abstract class MultiFilterRecordReader<K extends WritableComparable,V extends Writable>
extends CompositeRecordReader<K,V,V>
implements ComposableRecordReader<K,V>
Base class for Composite join returning values derived from multiple
sources, but generally not tuples.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classorg.apache.hadoop.mapred.join.MultiFilterRecordReader.MultiFilterDelegationIteratorProxy the JoinCollector, but include callback to emit. -
Field Summary
Fields inherited from class org.apache.hadoop.mapred.join.CompositeRecordReader
jc, kids -
Constructor Summary
ConstructorsConstructorDescriptionMultiFilterRecordReader(int id, JobConf conf, int capacity, Class<? extends WritableComparator> cmpcl) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancombine(Object[] srcs, TupleWritable dst) Default implementation offersemit(org.apache.hadoop.mapred.join.TupleWritable)every Tuple from the collector (the outer join of child RRs).Create an object of the appropriate type to be used as a value.protected abstract Vemit(TupleWritable dst) For each tuple emitted, return a value (typically one of the values in the tuple).protected ResetableIterator<V>Return an iterator returning a single value from the tuple.booleanReads the next key/value pair from the input for processing.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, 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
-
MultiFilterRecordReader
public MultiFilterRecordReader(int id, JobConf conf, int capacity, Class<? extends WritableComparator> cmpcl) throws IOException - Throws:
IOException
-
-
Method Details
-
emit
For each tuple emitted, return a value (typically one of the values in the tuple). Modifying the Writables in the tuple is permitted and unlikely to affect join behavior in most cases, but it is not recommended. It's safer to clone first.- Throws:
IOException
-
combine
Default implementation offersemit(org.apache.hadoop.mapred.join.TupleWritable)every Tuple from the collector (the outer join of child RRs).- Specified by:
combinein classCompositeRecordReader<K extends WritableComparable,V extends Writable, V extends Writable>
-
next
Reads the next key/value pair from the input for processing.- Specified by:
nextin interfaceRecordReader<K extends WritableComparable,V extends Writable> - 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,V extends Writable> - Returns:
- a new value object.
-
getDelegate
Return an iterator returning a single value from the tuple.- Specified by:
getDelegatein classCompositeRecordReader<K extends WritableComparable,V extends Writable, V extends Writable> - See Also:
-
MultiFilterRecordReader<K extends WritableComparable,V extends Writable>.org.apache.hadoop.mapred.join.MultiFilterRecordReader.MultiFilterDelegationIterator
-