This is an automated email from the ASF dual-hosted git repository. tzulitai pushed a commit to branch release-1.7 in repository https://gitbox.apache.org/repos/asf/flink.git
commit 4f9485f30647105d6e01717faf6fcd11ceb679fe Author: yanghua <yanghua1...@gmail.com> AuthorDate: Mon Dec 10 11:00:29 2018 +0800 [FLINK-10359] [docs] Scala example in DataSet docs is broken This closes #7266. --- docs/dev/batch/dataset_transformations.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/dev/batch/dataset_transformations.md b/docs/dev/batch/dataset_transformations.md index 96c04c9..cf2da3f 100644 --- a/docs/dev/batch/dataset_transformations.md +++ b/docs/dev/batch/dataset_transformations.md @@ -712,7 +712,7 @@ class MyCombinableGroupReducer out: Collector[String]): Unit = { val r: (String, Int) = - in.asScala.reduce( (a,b) => (a._1, a._2 + b._2) ) + in.iterator.asScala.reduce( (a,b) => (a._1, a._2 + b._2) ) // concat key and sum and emit out.collect (r._1 + "-" + r._2) } @@ -722,7 +722,7 @@ class MyCombinableGroupReducer out: Collector[(String, Int)]): Unit = { val r: (String, Int) = - in.asScala.reduce( (a,b) => (a._1, a._2 + b._2) ) + in.iterator.asScala.reduce( (a,b) => (a._1, a._2 + b._2) ) // emit tuple with key and sum out.collect(r) }