接口 IterationBody
-
- 所有超级接口:
Serializable
@Experimental public interface IterationBody extends Serializable
The builder of the subgraph that will be executed inside the iteration.Notes that inside the iteration body, users could only create the subgraph from the
variableStreamsanddataStreams. Users could not refers to other data stream outside the iteration through the closure, and could not add new sources / sinks inside the iteration.Some operations are not supported inside the iterations:
- Sources and Sinks.
DataStream.assignTimestampsAndWatermarks(WatermarkStrategy).DataStream.iterate().
Currently we also not support nested exception.
The iteration body also requires that the parallelism of any stream in the initial variable streams must equal to the parallelism of the stream at the same index of the feedback variable streams returned by the iteration body.
-
-
嵌套类概要
嵌套类 修饰符和类型 接口 说明 static interfaceIterationBody.PerRoundSubBodyThe sub-graph inside the iteration body that should be executed as per-round.
-
方法概要
所有方法 静态方法 实例方法 抽象方法 修饰符和类型 方法 说明 static DataStreamListforEachRound(DataStreamList inputs, IterationBody.PerRoundSubBody perRoundSubBody)IterationBodyResultprocess(DataStreamList variableStreams, DataStreamList dataStreams)This method creates the graph for the iteration body.
-
-
-
方法详细资料
-
process
IterationBodyResult process(DataStreamList variableStreams, DataStreamList dataStreams)
This method creates the graph for the iteration body. SeeIterationsfor how the iteration body can be executed and terminated.- 参数:
variableStreams- the variable streams, which will be updated via a feedback stream in each round.dataStreams- the streams referred in the iteration body, which will only be emitted in the first round.- 返回:
- the result of the iteration, including the feedbacks and outputs.
-
forEachRound
static DataStreamList forEachRound(DataStreamList inputs, IterationBody.PerRoundSubBody perRoundSubBody)
- 参数:
inputs- The inputs of the subgraph.perRoundSubBody- The computational logic that want to be executed as per-round.- 返回:
- The output of the subgraph.
-
-