Class MapPartitionIterator<IN>

java.lang.Object
org.apache.flink.streaming.api.operators.MapPartitionIterator<IN>
All Implemented Interfaces:
Iterator<IN>

@Internal public class MapPartitionIterator<IN> extends Object implements Iterator<IN>
The MapPartitionIterator is an iterator used in the MapPartitionOperator.The task main thread will add records to it. It will set itself as the input parameter of MapPartitionFunction and execute the function.
  • Field Details

    • DEFAULT_MAX_CACHE_NUM

      public static final int DEFAULT_MAX_CACHE_NUM
      Max number of caches.

      The constant defines the maximum number of caches that can be created. Its value is set to 100, which is considered sufficient for most parallel jobs. Each cache is a record and occupies a minimal amount of memory so the value is not excessively large.

      See Also:
  • Constructor Details

  • Method Details

    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<IN>
    • next

      public IN next()
      Specified by:
      next in interface Iterator<IN>
    • addRecord

      public void addRecord(IN record)
    • close

      public void close()