Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-30669

Update recent job status in FlinkDeployment resource object.

    XMLWordPrintableJSON

Details

    Description

      User jar has code asĀ  -

      main() {
       init env
       pipelines.foreach{
        env.fromSource(pipeline.getSource())
           .map(pipeline.transform())
           .sinkTo(pipeline.getSink())
        env.execute(pipeline.getName())
       }
      }

      and below configuration -

      execution.runtime-mode: "BATCH"
      execution.attached: "true"
      $internal.pipeline.job-id: "" 

      When this single jar executed in Application Mode by using flink-kubernetes-operator, multiple jobs are submitted sequentially and as per design only one of the JobStatus is always associated with FlinkDeployment k8s resource, this job status is periodically updated by operator. To update job status in k8s resource, it fetches all of the job status from job-manager rest endpoint and pick the first one and update that one. Problem is, job status list returned by job-manager rest api is not sorted on time.


      As you can see in above example, job autoscaling-3 is first one in the rest response and same updated in FlinkDeployment resource, but FlinkDeployment should have status of job autoscaling-19 because that is the last job finished.

      Attachments

        1. image-2023-01-13-09-54-13-457.png
          708 kB
          Mohemmad Zaid Khan
        2. image-2023-01-13-09-54-54-280.png
          172 kB
          Mohemmad Zaid Khan
        3. image-2023-01-13-10-04-32-891.png
          708 kB
          Mohemmad Zaid Khan

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kmozaid Mohemmad Zaid Khan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: