flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timo Walther <twal...@apache.org>
Subject Re: RichAsyncFunction in Scala
Date Wed, 31 Jan 2018 14:02:21 GMT
Hi Wouter,

you could use the Java classes as a workaround. If you take a look at 
the implementation [1], you will see that Scala only wraps the Java 
classes. I think you can implement the same. You can convert your result 
stream back into a Scala stream by calling `new 
o.a.f.streaming.api.scala.DataStream#DataStream(javaStream)`.

I hope that helps.

Regards,
Timo

[1] 
https://github.com/apache/flink/blob/master/flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/AsyncDataStream.scala#L70



Am 1/31/18 um 1:57 PM schrieb Wouter Zorgdrager:
> Hi,
>
> Currently there is no way of using the RichAsyncFunction in Scala, 
> this means I can't get access to the RuntimeContext. I know someone is 
> working on this: https://issues.apache.org/jira/browse/FLINK-6756 , 
> however in the meantime is there a workaround for this? I'm 
> particularly interested in getting the index of the subtask in my 
> AsyncFunction.
>
> Regards,
> Wouter



Mime
View raw message