You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Bruno Aranda <ba...@apache.org> on 2018/11/09 00:38:47 UTC

Rich variant for Async IO in Scala

Hi,

I see that the AsyncFunction for Scala does not seem to have a rich variant
like the Java one. Is there a particular reason for this? Is there any
workaround?

Thanks!

Bruno

Re: Rich variant for Async IO in Scala

Posted by Timo Walther <tw...@apache.org>.
It should compile against a RichAsyncFunction as well. Can you open an 
issue on JIRA for this? Including the compiler issues that you observe.

Thank you.

Am 13.11.18 um 15:40 schrieb Bruno Aranda:
> Hi,
>
> Tried again last night. The problem is that I was trying to 
> use org.apache.flink.streaming.api.*scala*.AsyncDataStream, and that 
> won't compile against the RichAsyncFunction. I could change it to use  
> org.apache.flink.streaming.api.*datastream*.AsyncDataStream instead, 
> but it is not as elegant as it requires the result to be a Java 
> collection. But it works.
>
> Thanks!
>
> Bruno
>
> On Mon, 12 Nov 2018 at 16:43 Timo Walther <twalthr@apache.org 
> <ma...@apache.org>> wrote:
>
>     Hi Bruno,
>
>     `org.apache.flink.streaming.api.functions.async.RichAsyncFunction`
>     should also work for the Scala API. `RichMapFunction` or
>     `RichFilterFunction` are also shared between both APIs.
>
>     Is there anything that blocks you from using it?
>
>     Regards,
>     Timo
>
>     Am 09.11.18 um 01:38 schrieb Bruno Aranda:
>     > Hi,
>     >
>     > I see that the AsyncFunction for Scala does not seem to have a rich
>     > variant like the Java one. Is there a particular reason for
>     this? Is
>     > there any workaround?
>     >
>     > Thanks!
>     >
>     > Bruno
>
>


Re: Rich variant for Async IO in Scala

Posted by Bruno Aranda <ba...@apache.org>.
Hi,

Tried again last night. The problem is that I was trying to
use org.apache.flink.streaming.api.*scala*.AsyncDataStream, and that won't
compile against the RichAsyncFunction. I could change it to use
org.apache.flink.streaming.api.*datastream*.AsyncDataStream instead, but it
is not as elegant as it requires the result to be a Java collection. But it
works.

Thanks!

Bruno

On Mon, 12 Nov 2018 at 16:43 Timo Walther <tw...@apache.org> wrote:

> Hi Bruno,
>
> `org.apache.flink.streaming.api.functions.async.RichAsyncFunction`
> should also work for the Scala API. `RichMapFunction` or
> `RichFilterFunction` are also shared between both APIs.
>
> Is there anything that blocks you from using it?
>
> Regards,
> Timo
>
> Am 09.11.18 um 01:38 schrieb Bruno Aranda:
> > Hi,
> >
> > I see that the AsyncFunction for Scala does not seem to have a rich
> > variant like the Java one. Is there a particular reason for this? Is
> > there any workaround?
> >
> > Thanks!
> >
> > Bruno
>
>
>

Re: Rich variant for Async IO in Scala

Posted by Timo Walther <tw...@apache.org>.
Hi Bruno,

`org.apache.flink.streaming.api.functions.async.RichAsyncFunction` 
should also work for the Scala API. `RichMapFunction` or 
`RichFilterFunction` are also shared between both APIs.

Is there anything that blocks you from using it?

Regards,
Timo

Am 09.11.18 um 01:38 schrieb Bruno Aranda:
> Hi,
>
> I see that the AsyncFunction for Scala does not seem to have a rich 
> variant like the Java one. Is there a particular reason for this? Is 
> there any workaround?
>
> Thanks!
>
> Bruno