public class DataStreamUtils extends Object
DataStream
.Constructor and Description |
---|
DataStreamUtils() |
Modifier and Type | Method and Description |
---|---|
static org.apache.flink.streaming.api.datastream.DataStream<double[]> |
allReduceSum(org.apache.flink.streaming.api.datastream.DataStream<double[]> input)
Applies allReduceSum on the input data stream.
|
static <IN,OUT> org.apache.flink.streaming.api.datastream.DataStream<OUT> |
mapPartition(org.apache.flink.streaming.api.datastream.DataStream<IN> input,
org.apache.flink.api.common.functions.MapPartitionFunction<IN,OUT> func)
Applies a
MapPartitionFunction on a bounded data stream. |
public static org.apache.flink.streaming.api.datastream.DataStream<double[]> allReduceSum(org.apache.flink.streaming.api.datastream.DataStream<double[]> input)
Note that we throw exception when one of the following two cases happen:
input
- The input data stream.public static <IN,OUT> org.apache.flink.streaming.api.datastream.DataStream<OUT> mapPartition(org.apache.flink.streaming.api.datastream.DataStream<IN> input, org.apache.flink.api.common.functions.MapPartitionFunction<IN,OUT> func)
MapPartitionFunction
on a bounded data stream.IN
- The class type of the input element.OUT
- The class type of output element.input
- The input data stream.func
- The user defined mapPartition function.Copyright © 2019–2023 The Apache Software Foundation. All rights reserved.