Hi,
I am trying to submit a pyFlink job in detached mode using the command:

../../flink-1.11.0/bin/flink run -d -py basic_streaming_job.py -j
flink-sql-connector-kafka_2.11-1.11.0.jar

The jobs are submitted successfully but the command does not return. I
realized that was because I had the following line in
basic_streaming_job.py:

ten_sec_summaries.get_job_client().get_job_execution_result().result()

This statement is useful when testing this locally within a minicluster
(using python basic_streaming_job.py) but not needed when the job is
submitted to a cluster.

So I would like to programmatically detect if the StreamExecutionEnvironment is
a localStreamEnvironment and execute the above snippet accordingly. How do
I do this?


Thanks,
Manas

Reply via email to