Hi, I’m trying to execute old DataSet batch jobs (...
# troubleshooting
b
Hi, I’m trying to execute old DataSet batch jobs (originally written with 1.4) in a newer (1.15 based) kubernetes environment using the operator. Some of the pipelines have multiple, eagerly executed jobs in them, e.g. a DataSet is collected using
.collect()
, and its result is used in another job from the same main method. In the original yarn-based environment, attached execution was used. When trying to use the default, detached mode, I got the error saying that eager executions (such as collect, count, ..) are not allowed in detached mode. When using
execution.attached: true
, I got this error:
Copy code
Caused by: org.apache.flink.util.FlinkRuntimeException: Cannot have more than one execute() or executeAsync() call in a single environment.
According to the docs, I think this should be possible: https://nightlies.apache.org/flink/flink-docs-master/docs/deployment/overview/#application-mode Can someone point me in the right direction?
I would like to avoid rewriting the job logic to broadcast/cross join the datasets.
(Also, I have the feeling that what I’m doing, i.e. attached + application mode using Kubernetes is not a valid setup. I assume that it makes no sense to either block the client, nor the JM which is running the main method to wait for the results). So, my question is: • In what sense does an application cluster support executing multiple jobs? • Does it support this old behavior? • What does attached execution mean in the case of an application cluster on k8s?
I think I’ve found the answer: https://stackoverflow.com/a/76761950 Upon looking into the Flink code, it seems that the problem is that the operator assumes that 1 deployment is 1 job. A jobId is set by the operator, in which case the Flink ApplicationDispatcherBootstrap calls runApplicationAsync with
enforceSingleJobExecution = true
, causing the above error.