[ 
https://issues.apache.org/jira/browse/FLINK-9317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16468411#comment-16468411
 ] 

ASF GitHub Bot commented on FLINK-9317:
---------------------------------------

GitHub user medcv opened a pull request:

    https://github.com/apache/flink/pull/5968

    [FLINK-9317] Async I/O API Example For Scala has Variable Name error

    ## What is the purpose of the change
    
    Updating AsyncIO Scala Example with proper variable names
    
    ## Does this pull request potentially affect one of the following parts:
    
      - Dependencies (does it add or upgrade a dependency): (no)
      - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: (no)
      - The serializers: (no)
      - The runtime per-record code paths (performance sensitive): (no)
      - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
      - The S3 file system connector: (no)
    
    ## Documentation
    
      - Does this pull request introduce a new feature? (no)
      - If yes, how is the feature documented? (not applicable / docs / 
JavaDocs / not documented)


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/medcv/flink FLINK-9317

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/5968.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #5968
    
----

----


> 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.1, 1.4.2
>            Reporter: Yazdan Shirvany
>            Priority: Minor
>              Labels: documentation
>
> 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)

Reply via email to