[ 
https://issues.apache.org/jira/browse/FLINK-30669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gyula Fora closed FLINK-30669.
------------------------------
    Fix Version/s: kubernetes-operator-1.4.0
       Resolution: Fixed

merged to main 9168c98b2e52538648670f79ee37a19e95d9580a

> Update recent job status in FlinkDeployment resource object.
> ------------------------------------------------------------
>
>                 Key: FLINK-30669
>                 URL: https://issues.apache.org/jira/browse/FLINK-30669
>             Project: Flink
>          Issue Type: Bug
>            Reporter: Mohemmad Zaid Khan
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: kubernetes-operator-1.4.0
>
>         Attachments: image-2023-01-13-09-54-13-457.png, 
> image-2023-01-13-09-54-54-280.png, image-2023-01-13-10-04-32-891.png
>
>
> User jar has code asĀ  -
> {code:java}
> main() {
>  init env
>  pipelines.foreach{
>   env.fromSource(pipeline.getSource())
>      .map(pipeline.transform())
>      .sinkTo(pipeline.getSink())
>   env.execute(pipeline.getName())
>  }
> }{code}
> and below configuration -
> {code:java}
> execution.runtime-mode: "BATCH"
> execution.attached: "true"
> $internal.pipeline.job-id: "" {code}
> 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.
> !image-2023-01-13-10-04-32-891.png|width=883,height=489!
> !image-2023-01-13-09-54-54-280.png|width=353,height=284!
> 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.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to