You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2018/12/11 09:49:42 UTC
[GitHub] asfgit closed pull request #7266: [FLINK-10359] Scala example in
DataSet docs is broken
asfgit closed pull request #7266: [FLINK-10359] Scala example in DataSet docs is broken
URL: https://github.com/apache/flink/pull/7266
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/docs/dev/batch/dataset_transformations.md b/docs/dev/batch/dataset_transformations.md
index 96c04c9d548..cf2da3fa91a 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)
}
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services