Class CollectResultIterator<T>

  • All Implemented Interfaces:
    AutoCloseable, Iterator<T>, org.apache.flink.util.CloseableIterator<T>

    public class CollectResultIterator<T>
    extends Object
    implements org.apache.flink.util.CloseableIterator<T>
    An iterator which iterates through the results of a query job.

    The behavior of the iterator is slightly different under different checkpointing mode.

    • If the user does not specify any checkpointing, results are immediately delivered but exceptions will be thrown when the job restarts.
    • If the user specifies exactly-once checkpointing, results are guaranteed to be exactly-once but they're only visible after the corresponding checkpoint completes.
    • If the user specifies at-least-once checkpointing, results are immediately delivered but the same result may be delivered multiple times.

    NOTE: After using this iterator, the close method MUST be called in order to release job related resources.

    • Constructor Detail

      • CollectResultIterator

        public CollectResultIterator​(String operatorUid,
                                     org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer,
                                     String accumulatorName,
                                     CheckpointConfig checkpointConfig,
                                     long resultFetchTimeout)