You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by "Howard,Li(vip.com)" <ho...@vipshop.com> on 2017/02/13 01:48:36 UTC

There is no Open and Close method in Async I/O API of Scala

Hi,
         I’m going to test async IO of scala version. As we can see in https://ci.apache.org/projects/flink/flink-docs-release-1.2/dev/stream/asyncio.html. The java version of async IO API has method of open and close, in which I can do some init and clean work. The scala api, however,  has neither open nor close. Even if I can do init work while construct the class, the clean work can’t be done for there’s no close method.
         When I look into the RichAsyncFunction which the java api extends from, I find it’s the subclass of AbstractRichFunction which provide open and close method. I try to make my Async IO Function extends both AbstractRichFunction and AsyncFunction but find out that the open method does not called by flink so It won’t work.
         I managed to find a work around by getting javaStream from scala stream and use Java api instead, but I don’t think it’s idea.
         Did I miss something? Or it’s just a bug. If it is a bug, I can open a issue and try to fix it.

Thanks.

Howard

李哲豪 | 技术中心  实时计算平台
vip.com | 唯品会
唯品会 一家专门做特卖的网站
手机:15210965971 / 信箱: howard.li@vipshop.com<ma...@vipshop.com>
地址:中国上海市闸北区西藏北路18号四行天地3楼
美国上市公司 纽交所代码:VIPS www.vip.com<http://www.vip.com/>

本电子邮件可能为保密文件。如果阁下非电子邮件所指定之收件人,谨请立即通知本人。敬请阁下不要使用、保存、复印、打印、散布本电子邮件及其内容,或将其用于其他任何目的或向任何人披露。谢谢您的合作! This communication is intended only for the addressee(s) and may contain information that is privileged and confidential. You are hereby notified that, if you are not an intended recipient listed above, or an authorized employee or agent of an addressee of this communication responsible for delivering e-mail messages to an intended recipient, any dissemination, distribution or reproduction of this communication (including any attachments hereto) is strictly prohibited. If you have received this communication in error, please notify us immediately by a reply e-mail addressed to the sender and permanently delete the original e-mail communication and any attachments from all storage devices without making or otherwise retaining a copy.

Re: There is no Open and Close method in Async I/O API of Scala

Posted by "Tzu-Li (Gordon) Tai" <tz...@apache.org>.
Hi Howard,

I don’t think there is a rich variant for Async IO in Scala yet. We should perhaps add support for it.

Looped in Till who worked on the Async IO and its Scala support to clarify whether there were any concerns in not supporting it initially.

Cheers,
Gordon


On February 13, 2017 at 9:49:32 AM, Howard,Li(vip.com) (howard.li@vipshop.com) wrote:

Hi,

         I’m going to test async IO of scala version. As we can see in https://ci.apache.org/projects/flink/flink-docs-release-1.2/dev/stream/asyncio.html. The java version of async IO API has method of open and close, in which I can do some init and clean work. The scala api, however,  has neither open nor close. Even if I can do init work while construct the class, the clean work can’t be done for there’s no close method.

         When I look into the RichAsyncFunction which the java api extends from, I find it’s the subclass of AbstractRichFunction which provide open and close method. I try to make my Async IO Function extends both AbstractRichFunction and AsyncFunction but find out that the open method does not called by flink so It won’t work.

         I managed to find a work around by getting javaStream from scala stream and use Java api instead, but I don’t think it’s idea.

         Did I miss something? Or it’s just a bug. If it is a bug, I can open a issue and try to fix it.

 

Thanks.

 

Howard

 

李哲豪 | 技术中心  实时计算平台

vip.com | 唯品会

唯品会 一家专门做特卖的网站

手机:15210965971 / 信箱: howard.li@vipshop.com

地址:中国上海市闸北区西藏北路18号四行天地3楼

美国上市公司 纽交所代码:VIPS www.vip.com

 

本电子邮件可能为保密文件。如果阁下非电子邮件所指定之收件人,谨请立即通知本人。敬请阁下不要使用、保存、复印、打印、散布本电子邮件及其内容,或将其用于其他任何目的或向任何人披露。谢谢您的合作! This communication is intended only for the addressee(s) and may contain information that is privileged and confidential. You are hereby notified that, if you are not an intended recipient listed above, or an authorized employee or agent of an addressee of this communication responsible for delivering e-mail messages to an intended recipient, any dissemination, distribution or reproduction of this communication (including any attachments hereto) is strictly prohibited. If you have received this communication in error, please notify us immediately by a reply e-mail addressed to the sender and permanently delete the original e-mail communication and any attachments from all storage devices without making or otherwise retaining a copy.