[ 
https://issues.apache.org/jira/browse/FLINK-9545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16510921#comment-16510921
 ] 

Kostas Kloudas commented on FLINK-9545:
---------------------------------------

Hi [~phoenixjiangnan]! 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)

Reply via email to