@Experimental
public interface IterationListener<T>
Modifier and Type | Interface and Description |
---|---|
static interface |
IterationListener.Context
Information available in an invocation of the callbacks defined in the
IterationProgressListener.
|
Modifier and Type | Method and Description |
---|---|
void |
onEpochWatermarkIncremented(int epochWatermark,
IterationListener.Context context,
org.apache.flink.util.Collector<T> collector)
This callback is invoked every time the epoch watermark of this operator increments.
|
void |
onIterationTerminated(IterationListener.Context context,
org.apache.flink.util.Collector<T> collector)
This callback is invoked after the execution of the iteration body has terminated.
|
void onEpochWatermarkIncremented(int epochWatermark, IterationListener.Context context, org.apache.flink.util.Collector<T> collector) throws Exception
The epochWatermark is the maximum integer that meets this requirement: every record that arrives at the operator going forward should have an epoch larger than the epochWatermark. See Java docs in IterationUtils for how epoch is determined for records ingested into the iteration body and for records emitted by operators within the iteration body.
If all inputs are bounded, the maximum epoch of all records ingested into this operator is used as the epochWatermark parameter for the last invocation of this callback.
epochWatermark
- The incremented epoch watermark.context
- A context that allows emitting side output. The context is only valid during
the invocation of this method.collector
- The collector for returning result values.Exception
void onIterationTerminated(IterationListener.Context context, org.apache.flink.util.Collector<T> collector) throws Exception
context
- A context that allows emitting side output. The context is only valid during
the invocation of this method.collector
- The collector for returning result values.Exception
Iterations
Copyright © 2019–2023 The Apache Software Foundation. All rights reserved.