应该只能改ContinuousFileMonitoringFunction源码 , 支持多path 王智 <[email protected]> 于2020年3月4日周三 下午6:34写道:
> 我的需求是2,现在我使用的是execEnv.createInput(inputFormat()), > > 我先去试试 env.addSource(new InputFormatSourceFunction(..)...)。 > > 多谢~ > > > > > > > > > 原始邮件 > > > 发件人:"JingsongLee"< [email protected] >; > > 发件时间:2020/3/4 17:40 > > 收件人:"user-zh"< [email protected] >; > > 主题: Re: flink 1.8 内的StreamExecutionEnvironment 对于 FileInputFormat 多file > path 不兼容问题咨询 > > > > Hi, 你的需求是什么?下列哪种? - 1.想用unbounded source,continuous的file > source,监控文件夹,发送新文件,且需要支持多文件夹 - 2.只是想用bounded的input format,需要支持多文件 > 如果是1,现在仍然不支持。 如果是2,那你可以用env.addSource(new > InputFormatSourceFunction(..)...)来支持多文件。 Best, Jingsong Lee > ------------------------------------------------------------------ > From:王智Send Time:2020年3月4日(星期三) 17:34 To:user-zhSubject:flink 1.8 > 内的StreamExecutionEnvironment 对于 FileInputFormat 多file path 不兼容问题咨询 > 我在使用flink 1.8 自定义 FileInputFormat > 的时候遇到了不兼容问题,初步看了源代码,不知道自己得出的结论是否正确,并想了解一下后续趋势和进展,麻烦各位大佬抽空指点一下,先行感谢~~ 问题1: > StreamExecutionEnvironment 为什么要做这样的限制?ContinuousFileMonitoringFunction > 的作用是什么? 相关的代码描述如下 StreamExecutionEnvironment 对 FileInputFormat 对象有特殊的处理逻辑 > if (inputFormat instanceof FileInputFormat) { > @SuppressWarnings("unchecked") FileInputFormat
