flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ☼ R Nair (रविशंकर नायर) <ravishankar.n...@gmail.com>
Subject Re: Monitoring folder in flink
Date Tue, 24 Oct 2017 12:56:43 GMT
Can you please share the full code?

Thanks, RAV

On Oct 22, 2017 3:37 AM, "Sugandha Amatya" <sugandha.amatya@gmail.com>
wrote:

I have folder where new files arrive at schedule. Why is my flink readfile
not reading new files. I have used but *PROCESS_ONCE* and
*PROCESS_CONTINUOUSLY*. When I use *PROCESS_CONTINUOUSLY* it reads the same
file but the execution does not terminate whereas for PROCESS_ONCE it
terminates in IDE.

    String path = "C:\\test";

StreamExecutionEnvironment env = StreamExecutionEnvironment.
getExecutionEnvironment();

    TextInputFormat format = new TextInputFormat(new
org.apache.flink.core.fs.Path(path));

    DataStream<String> inputStream = env.readFile(format, path,
FileProcessingMode.PROCESS_ONCE, 100);

Here at stackoverflow
<https://stackoverflow.com/questions/46871106/how-to-read-new-files-arriving-in-folder-using-flink>
.

Mime
View raw message