You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tz...@apache.org on 2018/12/11 12:46:38 UTC
[flink] 07/07: [FLINK-10359] [docs] Scala example in DataSet docs
is broken
This is an automated email from the ASF dual-hosted git repository.
tzulitai pushed a commit to branch release-1.6
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 89fdf654c2aea536a3a15685bc3cc57bccbd420f
Author: yanghua <ya...@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)
}