[ 
https://issues.apache.org/jira/browse/FLINK-29498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eric Xiao updated FLINK-29498:
------------------------------
    Description: 
We are using the async I/O to make HTTP calls and one of the features we wanted 
to leverage was the retries, so we pulled the newest commit: 
[http://github.com/apache/flink/pull/19983] into our internal Flink fork.

When I try calling the function {{AsyncDataStream.unorderedWaitWithRetry}} from 
the scala API I with a retry strategy from the java API I get an error as 
{{unorderedWaitWithRetry}} expects a scala retry strategy. The problem is that 
retry strategies were only implemented in java and not Scala in this PR: 
[http://github.com/apache/flink/pull/19983].

 

Here is some of the code to reproduce the error:
{code:java}
import org.apache.flink.streaming.api.scala.AsyncDataStream
import org.apache.flink.streaming.util.retryable.{AsyncRetryStrategies => 
JAsyncRetryStrategies}

val javaAsyncRetryStrategy = new 
JAsyncRetryStrategies.FixedDelayRetryStrategyBuilder[Int](3, 100L)
    .build()

val data = AsyncDataStream.unorderedWaitWithRetry(
  source,
  asyncOperator,
  pipelineTimeoutInMs,
  TimeUnit.MILLISECONDS,
  javaAsyncRetryStrategy
){code}

  was:
When I try calling the function \{{AsyncDataStream.unorderedWaitWithRetry}} 
from the scala API I with a retry strategy from the java API I get an error as 
\{{unorderedWaitWithRetry}} expects a scala retry strategy. The problem is that 
retry strategies were only implemented in java and not Scala in this PR: 
[http://github.com/apache/flink/pull/19983].
{code:java}
import org.apache.flink.streaming.api.scala.AsyncDataStream
import org.apache.flink.streaming.util.retryable.{AsyncRetryStrategies => 
JAsyncRetryStrategies}

val javaAsyncRetryStrategy = new 
JAsyncRetryStrategies.FixedDelayRetryStrategyBuilder[Int](3, 100L)
    .build()

val data = AsyncDataStream.unorderedWaitWithRetry(
  source,
  asyncOperator,
  pipelineTimeoutInMs,
  TimeUnit.MILLISECONDS,
  javaAsyncRetryStrategy
){code}


> Flink Async I/O Retry Strategies Do Not Work for Scala AsyncDataStream API
> --------------------------------------------------------------------------
>
>                 Key: FLINK-29498
>                 URL: https://issues.apache.org/jira/browse/FLINK-29498
>             Project: Flink
>          Issue Type: Bug
>          Components: API / Scala
>    Affects Versions: 1.15.2
>            Reporter: Eric Xiao
>            Priority: Minor
>
> We are using the async I/O to make HTTP calls and one of the features we 
> wanted to leverage was the retries, so we pulled the newest commit: 
> [http://github.com/apache/flink/pull/19983] into our internal Flink fork.
> When I try calling the function {{AsyncDataStream.unorderedWaitWithRetry}} 
> from the scala API I with a retry strategy from the java API I get an error 
> as {{unorderedWaitWithRetry}} expects a scala retry strategy. The problem is 
> that retry strategies were only implemented in java and not Scala in this PR: 
> [http://github.com/apache/flink/pull/19983].
>  
> Here is some of the code to reproduce the error:
> {code:java}
> import org.apache.flink.streaming.api.scala.AsyncDataStream
> import org.apache.flink.streaming.util.retryable.{AsyncRetryStrategies => 
> JAsyncRetryStrategies}
> val javaAsyncRetryStrategy = new 
> JAsyncRetryStrategies.FixedDelayRetryStrategyBuilder[Int](3, 100L)
>     .build()
> val data = AsyncDataStream.unorderedWaitWithRetry(
>   source,
>   asyncOperator,
>   pipelineTimeoutInMs,
>   TimeUnit.MILLISECONDS,
>   javaAsyncRetryStrategy
> ){code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to