You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-zh@flink.apache.org by 阿华田 <a1...@163.com> on 2020/06/20 08:37:59 UTC

回复: FileInputFormat 使用问题

解决了  
| |
阿华田
|
|
a15733178518@163.com
|
签名由网易邮箱大师定制


在2020年06月18日 17:56,john<50...@qq.com> 写道:
嗨,找到问题了吗?我也遇到了

2020年6月1日 下午2:48,阿华田 <a1...@163.com> 写道:

//初始化任务参数
ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
FileInputFormat fileInputFormat = new TextInputFormat(new Path("hdfs://arc/success_fid_flow <hdfs://arc/success_fid_flow>"));
fileInputFormat.setNestedFileEnumeration(true);
//过滤掉条件为true
fileInputFormat.setFilesFilter(new RegexExcludePathAndTimeFilter("2020-05-24","2020-05-24"));
DataSet<String> source =env.createInput(fileInputFormat);
source.output(new HdfsTrainSinktest());