Class MultiFilterRecordReader<K extends WritableComparable<?>,V extends Writable>
java.lang.Object
org.apache.hadoop.mapreduce.RecordReader<K,V>
org.apache.hadoop.mapreduce.lib.join.ComposableRecordReader<K,X>
org.apache.hadoop.mapreduce.lib.join.CompositeRecordReader<K,V,V>
org.apache.hadoop.mapreduce.lib.join.MultiFilterRecordReader<K,V>
- All Implemented Interfaces:
Closeable,AutoCloseable,Comparable<ComposableRecordReader<K,,?>> Configurable
- Direct Known Subclasses:
OverrideRecordReader
@Public
@Stable
public abstract class MultiFilterRecordReader<K extends WritableComparable<?>,V extends Writable>
extends CompositeRecordReader<K,V,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.mapreduce.lib.join.MultiFilterRecordReader.MultiFilterDelegationIteratorProxy the JoinCollector, but include callback to emit.Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.lib.join.CompositeRecordReader
org.apache.hadoop.mapreduce.lib.join.CompositeRecordReader.JoinCollector -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionMultiFilterRecordReader(int id, Configuration conf, int capacity, Class<? extends WritableComparator> cmpcl) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancombine(Object[] srcs, TupleWritable dst) Default implementation offersemit(org.apache.hadoop.mapreduce.lib.join.TupleWritable)every Tuple from the collector (the outer join of child RRs).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.voidinitialize(InputSplit split, TaskAttemptContext context) Called once at initialization.booleanRead the next key, value pair.Methods inherited from class org.apache.hadoop.mapreduce.lib.join.CompositeRecordReader
accept, add, close, compareTo, createKey, createTupleWritable, fillJoinCollector, getComparator, getConf, getCurrentKey, getCurrentValue, getProgress, getRecordReaderQueue, hasNext, id, key, key, setConf, skip
-
Constructor Details
-
MultiFilterRecordReader
public MultiFilterRecordReader(int id, Configuration 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.mapreduce.lib.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>
-
nextKeyValue
Read the next key, value pair.- Specified by:
nextKeyValuein classRecordReader<K extends WritableComparable<?>,V extends Writable> - Returns:
- true if a key/value pair was read
- Throws:
IOExceptionInterruptedException
-
initialize
public void initialize(InputSplit split, TaskAttemptContext context) throws IOException, InterruptedException Description copied from class:RecordReaderCalled once at initialization.- Overrides:
initializein classCompositeRecordReader<K extends WritableComparable<?>,V extends Writable, V extends Writable> - Parameters:
split- the split that defines the range of records to readcontext- the information about the task- Throws:
IOExceptionInterruptedException
-
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.mapreduce.lib.join.MultiFilterRecordReader.MultiFilterDelegationIterator
-