Hi there !, [FIXED] I have coded a regular Flink a...
# troubleshooting
n
Hi there !, [FIXED] I have coded a regular Flink app (v1.18) that reads files from a given directory. By default, it works fine because it reads all the files, the next step is to get it working in streaming mode but I'm unable to set the runtime mode according to https://nightlies.apache.org/flink/flink-docs-release-1.18/docs/dev/datastream/execution_mode/
Copy code
$FLINK_HOME/bin/flink run -Dexecution.runtime-mode=STREAMING -c com.example.DataStreamJob target/flink-poc-1.0.jar
I also tried by explicitly setting the runtime in the
env
Copy code
final StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
env.setRuntimeMode(RuntimeExecutionMode.STREAMING);
but it did not work because the job finishes in a couple of seconds. The test I want to perform is by copying a new file into the directory and check that the file is being processed What am I missing ? Any hints ?
I was using
env#readTextFile(String)
instead of
env#readFile(FileInputFormat<OUT>, String, FileProcessingMode, long, TypeInformation<OUT>)
with
FileProcessingMode.PROCESS_CONTINUOUSLY