You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Chesnay Schepler (JIRA)" <ji...@apache.org> on 2018/05/10 11:54:00 UTC
[jira] [Closed] (FLINK-9317) Async I/O API Example For Scala has
Variable Name error
[ https://issues.apache.org/jira/browse/FLINK-9317?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chesnay Schepler closed FLINK-9317.
-----------------------------------
Resolution: Fixed
Fix Version/s: 1.4.3
1.5.0
master: afcdb26408eb6de5f529c2df3424cc80a61062f8
1.5: 6389f4ed9c21d77836c232fed5116044d01cb5b0
1.4: 695b95a6dfbee8a707b155e187a49467538e931f
> Async I/O API Example For Scala has Variable Name error
> -------------------------------------------------------
>
> Key: FLINK-9317
> URL: https://issues.apache.org/jira/browse/FLINK-9317
> Project: Flink
> Issue Type: Bug
> Components: Documentation
> Affects Versions: 1.4.2
> Reporter: Yazdan Shirvany
> Priority: Minor
> Labels: documentation
> Fix For: 1.5.0, 1.4.3
>
>
> h2. Async I/O API Scala Example has duplicated {{resultFuture variable with different data type.}}
>
> {{resultFuture: ResultFuture[(String, String)]}}
> val resultFuture: Future[String]
>
> {{this cause error on compile as variables have same naming.}}
>
> {{In order to example works properly we need to update variable names to be distinct,}}
>
> {{```}}
> override def asyncInvoke(input: (String,String, String), resultFuture: ResultFuture[(String,String, String, String)]): Unit = {
> // issue the asynchronous request, receive a future for the result
> val *resultFutureRequested*: Future[String] = Future
> { // client2.query(str) client.getAccountReferenceId(token, input._1) }
> // set the callback to be executed once the request by the client is complete
> // the callback simply forwards the result to the result future
> *resultFutureRequested*.onSuccess {
> case result: String =>
> { resultFuture.complete(Iterable((input._1, input._2, input._3, result))) }
> }
> }
> {{```}}
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)