Search code examples
apache-flinkflink-batch

can flink operator support batch job with ApplicationCluster?


when the batch job finish, what will the ApplicationCluster state suppose to be? Is 'increase restartNonce' a by designed way to re-run the job?

i am trying to use flink operator to deploy a flink batch job, and trigger it with a kubernetes cronjob every day at a certain time


Solution

  • The operator is designed mostly with streaming jobs in mind but in theory batch jobs should also work.

    When a batch job finishes (Flink 1.15 and above) the FlinkDeployment.status.jobStatus.state should go into FINISHED.

    Bumping the restartNonce would resubmit the job, if you set the upgradeMode to stateless this would start it completely from fresh.

    So in theory you could cron the bumping of the restartNonce but this is not a pattern we have tested or use in production ourselves.