Repository: flink
Updated Branches:
  refs/heads/master 45e01cf23 -> fcc1efcb0


[FLINK-5877] [docs] Fix Async I/O Scala snippet

This closes #3383


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/2d2ffbad
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/2d2ffbad
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/2d2ffbad

Branch: refs/heads/master
Commit: 2d2ffbad9684e879aa92473798701b7cfc0d1277
Parents: 45e01cf
Author: Andrea Sella <[email protected]>
Authored: Tue Feb 21 21:18:16 2017 +0100
Committer: Stephan Ewen <[email protected]>
Committed: Wed Feb 22 11:28:51 2017 +0100

----------------------------------------------------------------------
 docs/dev/stream/asyncio.md | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/2d2ffbad/docs/dev/stream/asyncio.md
----------------------------------------------------------------------
diff --git a/docs/dev/stream/asyncio.md b/docs/dev/stream/asyncio.md
index dbf2b9c..c4414b4 100644
--- a/docs/dev/stream/asyncio.md
+++ b/docs/dev/stream/asyncio.md
@@ -139,7 +139,7 @@ class AsyncDatabaseRequest extends AsyncFunction[String, 
(String, String)] {
     lazy val client: DatabaseClient = new DatabaseClient(host, post, 
credentials)
 
     /** The context used for the future callbacks */
-    implicit lazy val executor: ExecutionContext = 
ExecutionContext.fromExecutor(Executors.directExecutor()))
+    implicit lazy val executor: ExecutionContext = 
ExecutionContext.fromExecutor(Executors.directExecutor())
 
 
     override def asyncInvoke(str: String, asyncCollector: 
AsyncCollector[(String, String)]): Unit = {
@@ -150,8 +150,8 @@ class AsyncDatabaseRequest extends AsyncFunction[String, 
(String, String)] {
         // set the callback to be executed once the request by the client is 
complete
         // the callback simply forwards the result to the collector
         resultFuture.onSuccess {
-            case result: String => 
asyncCollector.collect(Collections.singleton((str, result)));
-        })
+            case result: String => asyncCollector.collect(Iterable((str, 
result)));
+        }
     }
 }
 

Reply via email to