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:
- Comparable<ComposableRecordReader<K,?>>, Configurable, ComposableRecordReader<K,V>, RecordReader<K,V>
- Direct Known Subclasses:
- OverrideRecordReader
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.
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 |
MultiFilterRecordReader
public MultiFilterRecordReader(int id,
JobConf conf,
int capacity,
Class<? extends WritableComparator> cmpcl)
throws IOException
- Throws:
IOException
emit
protected abstract V emit(TupleWritable dst)
throws IOException
- 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
protected boolean combine(Object[] srcs,
TupleWritable dst)
- Default implementation offers
emit(org.apache.hadoop.mapred.join.TupleWritable)
every Tuple from the
collector (the outer join of child RRs).
- Specified by:
combine
in class CompositeRecordReader<K extends WritableComparable,V extends Writable,V extends Writable>
next
public boolean next(K key,
V value)
throws IOException
- Reads the next key/value pair from the input for processing.
- Specified by:
next
in interface RecordReader<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
public V createValue()
- Create an object of the appropriate type to be used as a value.
- Specified by:
createValue
in interface RecordReader<K extends WritableComparable,V extends Writable>
- Returns:
- a new value object.
getDelegate
protected ResetableIterator<V> getDelegate()
- Return an iterator returning a single value from the tuple.
- Specified by:
getDelegate
in class CompositeRecordReader<K extends WritableComparable,V extends Writable,V extends Writable>
- See Also:
MultiFilterRecordReader.MultiFilterDelegationIterator
Copyright © 2009 The Apache Software Foundation