flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard,Li(vip.com)" <howard...@vipshop.com>
Subject There is no Open and Close method in Async I/O API of Scala
Date Mon, 13 Feb 2017 01:48:36 GMT
         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.



李哲豪 | 技术中心  实时计算平台
vip.com | 唯品会
唯品会 一家专门做特卖的网站
手机:15210965971 / 信箱: howard.li@vipshop.com<mailto:howard.li@vipshop.com>
美国上市公司 纽交所代码: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.
View raw message