Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.

Nested Class Summary
`protected class` | `MultiFilterRecordReader.MultiFilterDelegationIterator` Proxy the JoinCollector, but include callback to emit.

Field Summary

Fields inherited from class org.apache.hadoop.mapred.join.CompositeRecordReader
`jc, kids`

Constructor Summary
`MultiFilterRecordReader(int id, JobConf conf, int capacity, Class<? extends WritableComparator> cmpcl)`

Method Summary
`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).
`V` | `createValue()` Create an object of the appropriate type to be used as a value.
`protected abstract V` | `emit(TupleWritable dst)` For each tuple emitted, return a value (typically one of the values in the tuple).
`protected ResetableIterator<V>` | `getDelegate()` Return an iterator returning a single value from the tuple.
`boolean` | `next(K key, V value)` Reads 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, skip`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.apache.hadoop.mapred.join.ComposableRecordReader
`accept, hasNext, id, key, key, skip`

Methods inherited from interface org.apache.hadoop.mapred.RecordReader
`close, createKey, getPos, getProgress`

Methods inherited from interface java.lang.Comparable
`compareTo`

Constructor Detail

### MultiFilterRecordReader

    public MultiFilterRecordReader(int id,
                                   JobConf conf,
                                   int capacity,
                                   Class<? extends WritableComparator> cmpcl)
                            throws IOException

Throws:
  `IOException`

Method Detail

### 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 into
    `value` - 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation