0
votes

Flink Cluster Details,
Number of nodes : 4
Flink Version : 1.11
Flink Client : RestCluserClient

We are submitting Flink batch job from streaming job using PackagedProgram, but our requirement is to execute only one job at a time, let's say we got 2 events from source so idealy 2 batch job must be triggered(each per event) but only one at a time. To achieve this, we were using client.setDetached(false) (in previous version of flink), but once we have migrated it to 1.11 setDetached(false) API has been removed.

Do we have any idea how to implement this requirement ?

1

1 Answers

0
votes

After analysis more on this, I found the solution. Flink 1.11 API provided Utils class for submitting the job viz,ClientUtils and it has two methods,

  1. ClientUtils.submitJob() -> this method works with detached mode as true
  2. ClientUtils.submitJobAndWaitForExecutionResult() -> this works as detached mode as false.