You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by se...@apache.org on 2017/02/23 16:42:36 UTC
[2/2] flink git commit: [FLINK-5877] [docs] Fix Async I/O Scala
snippet
[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/b5ec1464
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/b5ec1464
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/b5ec1464
Branch: refs/heads/release-1.2
Commit: b5ec146413bedf55867e15652c7e29f1e4e2d220
Parents: 74b29f5
Author: Andrea Sella <an...@radicalbit.io>
Authored: Tue Feb 21 21:18:16 2017 +0100
Committer: Stephan Ewen <se...@apache.org>
Committed: Thu Feb 23 17:37:27 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/b5ec1464/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)));
+ }
}
}