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

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

Github user pnowojski commented on a diff in the pull request:

    https://github.com/apache/flink/pull/6091#discussion_r191768672
  
    --- Diff: 
flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/async/AsyncFunction.scala
 ---
    @@ -46,4 +48,16 @@ trait AsyncFunction[IN, OUT] extends Function {
         * @param resultFuture to be completed with the result data
         */
       def asyncInvoke(input: IN, resultFuture: ResultFuture[OUT]): Unit
    +
    +  /**
    +    * [[AsyncFunction.asyncInvoke]] timeout occurred.
    +    * By default, the result future is exceptionally completed with 
timeout exception.
    +    *
    +    * @param input element coming from an upstream task
    +    * @param resultFuture to be completed with the result data
    +    */
    +  def timeout(input: IN, resultFuture: ResultFuture[OUT]): Unit = {
    +    resultFuture.completeExceptionally(new TimeoutException("Async 
function call has timed out."))
    --- End diff --
    
    same question about the tests.


> Add handler for Async IO operator timeouts 
> -------------------------------------------
>
>                 Key: FLINK-7789
>                 URL: https://issues.apache.org/jira/browse/FLINK-7789
>             Project: Flink
>          Issue Type: Improvement
>          Components: DataStream API
>            Reporter: Karthik Deivasigamani
>            Assignee: blues zheng
>            Priority: Major
>
> Currently Async IO operator does not provide a mechanism to handle timeouts. 
> When a request times out it an exception is thrown and job is restarted. It 
> would be good to pass a AsyncIOTimeoutHandler which can be implemented by the 
> user and passed in the constructor.
> Here is the discussion from apache flink users mailing list 
> http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/async-io-operator-timeouts-tt16068.html



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to