[ https://issues.apache.org/jira/browse/FLINK-9545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16511159#comment-16511159 ]
ASF GitHub Bot commented on FLINK-9545: --------------------------------------- Github user kl0u commented on the issue: https://github.com/apache/flink/pull/6130 Hi @bowenli86 ! Why not having a `flatmap` after the `readFile` and for every incoming element you emit as many copies as you want? Personally, I am not so fond of adding methods to the public APIs for such specific usecases. > Support read a file multiple times in Flink DataStream > ------------------------------------------------------- > > Key: FLINK-9545 > URL: https://issues.apache.org/jira/browse/FLINK-9545 > Project: Flink > Issue Type: Improvement > Components: DataStream API > Affects Versions: 1.6.0 > Reporter: Bowen Li > Assignee: Bowen Li > Priority: Major > Fix For: 1.6.0 > > > Motivation: We have the requirements to read a bunch files, each file to read > multiple times, to feed our streams > Specifically we need {{StreamExecutionEnvironment.readFile/readTextFile}} to > be able to read a file for a specified {{N}} times, but currently it only > supports reading file once. > We've implemented this internally. Would be good to get it back to the > community version. This jira is to add support for the feature. > Plan: > add a new processing mode as PROCESSING_N_TIMES, and add additional parameter > {{numTimes}} for {{StreamExecutionEnvironment.readFile/readTextFile}} -- This message was sent by Atlassian JIRA (v7.6.3#76005)