lindong28 commented on code in PR #90:
URL: https://github.com/apache/flink-ml/pull/90#discussion_r865893645
##########
flink-ml-core/src/main/java/org/apache/flink/ml/common/datastream/DataStreamUtils.java:
##########
@@ -67,6 +72,28 @@ public static <IN, OUT> DataStream<OUT> mapPartition(
.setParallelism(input.getParallelism());
}
+ /**
+ * Applies a {@link ReduceFunction} on a bounded data stream. The output
stream contains at most
+ * one stream record and its parallelism is one.
+ *
+ * @param input The input data stream.
+ * @param func The user defined reduce function.
+ * @param <T> The class type of the input.
+ * @return The result data stream.
+ */
+ public static <T> DataStream<T> reduce(DataStream<T> input,
ReduceFunction<T> func) {
Review Comment:
You are right. Thanks for the explanation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]