org.apache.hadoop.mapreduce.lib.join

## Class JoinRecordReader.JoinDelegationIterator

- java.lang.Object
- - org.apache.hadoop.mapreduce.lib.join.JoinRecordReader.JoinDelegationIterator

- All Implemented Interfaces:
    ResetableIterator<TupleWritable>
  Enclosing class:
    JoinRecordReader<K extends org.apache.hadoop.io.WritableComparable<?>>

      protected class JoinRecordReader.JoinDelegationIterator
      extends Object
      implements ResetableIterator<TupleWritable>

  Since the JoinCollector is effecting our operation, we need only provide an iterator proxy wrapping its operation.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.apache.hadoop.mapreduce.lib.join.ResetableIterator

      `ResetableIterator.EMPTY<U extends org.apache.hadoop.io.Writable>`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `JoinDelegationIterator()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(TupleWritable item)` Add an element to the collection of elements to iterate over.
    `void` | `clear()` Close datasources, but do not release internal resources.
    `void` | `close()` Close datasources and release resources.
    `boolean` | `hasNext()` True if a call to next may return a value.
    `boolean` | `next(TupleWritable val)` Assign next value to actual.
    `boolean` | `replay(TupleWritable val)` Assign last value returned to actual.
    `void` | `reset()` Set iterator to return to the start of its range.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### JoinDelegationIterator

          protected JoinDelegationIterator()

  - ### Method Detail

    - #### hasNext

          public boolean hasNext()

      Description copied from interface: `ResetableIterator`
      True if a call to next may return a value. This is permitted false positives, but not false negatives.
      Specified by:
        `hasNext` in interface `ResetableIterator<TupleWritable>`

    - #### next

          public boolean next(TupleWritable val)
                       throws IOException

      Description copied from interface: `ResetableIterator`
      Assign next value to actual. It is required that elements added to a ResetableIterator be returned in the same order after a call to `ResetableIterator.reset()` (FIFO). Note that a call to this may fail for nested joins (i.e. more elements available, but none satisfying the constraints of the join)
      Specified by:
        `next` in interface `ResetableIterator<TupleWritable>`
      Throws:
        `IOException`

    - #### replay

          public boolean replay(TupleWritable val)
                         throws IOException

      Description copied from interface: `ResetableIterator`
      Assign last value returned to actual.
      Specified by:
        `replay` in interface `ResetableIterator<TupleWritable>`
      Throws:
        `IOException`

    - #### reset

          public void reset()

      Description copied from interface: `ResetableIterator`
      Set iterator to return to the start of its range. Must be called after calling `ResetableIterator.add(T)` to avoid a ConcurrentModificationException.
      Specified by:
        `reset` in interface `ResetableIterator<TupleWritable>`

    - #### add

          public void add(TupleWritable item)
                   throws IOException

      Description copied from interface: `ResetableIterator`
      Add an element to the collection of elements to iterate over.
      Specified by:
        `add` in interface `ResetableIterator<TupleWritable>`
      Throws:
        `IOException`

    - #### close

          public void close()
                     throws IOException

      Description copied from interface: `ResetableIterator`
      Close datasources and release resources. Calling methods on the iterator after calling close has undefined behavior.
      Specified by:
        `close` in interface `ResetableIterator<TupleWritable>`
      Throws:
        `IOException`

    - #### clear

          public void clear()

      Description copied from interface: `ResetableIterator`
      Close datasources, but do not release internal resources. Calling this method should permit the object to be reused with a different datasource.
      Specified by:
        `clear` in interface `ResetableIterator<TupleWritable>`

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.