From user-return-17916-archive-asf-public=cust-asf.ponee.io@flink.apache.org Wed Jan 31 15:02:29 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 1AB28180662 for ; Wed, 31 Jan 2018 15:02:29 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 0A46C160C35; Wed, 31 Jan 2018 14:02:29 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 4747E160C25 for ; Wed, 31 Jan 2018 15:02:28 +0100 (CET) Received: (qmail 5563 invoked by uid 500); 31 Jan 2018 14:02:27 -0000 Mailing-List: contact user-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list user@flink.apache.org Received: (qmail 5554 invoked by uid 99); 31 Jan 2018 14:02:26 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Jan 2018 14:02:26 +0000 Received: from [192.168.178.63] (ip-2-205-86-231.web.vodafone.de [2.205.86.231]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 832511A00CD for ; Wed, 31 Jan 2018 14:02:24 +0000 (UTC) Subject: Re: RichAsyncFunction in Scala To: user@flink.apache.org References: From: Timo Walther Message-ID: Date: Wed, 31 Jan 2018 15:02:21 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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