[ 
https://issues.apache.org/jira/browse/FLINK-26178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17497521#comment-17497521
 ] 

Biao Geng edited comment on FLINK-26178 at 2/24/22, 4:52 PM:
-------------------------------------------------------------

Some thoughts in doing this ticket:
As the description of this ticket said, Flink has its own 
{{org.apache.flink.api.common.JobStatus}} (including INITIALIZING, RUNNING, 
SUSPENDED, ...), which may be included in 
{{{}org.apache.flink.runtime.client.JobStatusMessage{}}}. But here I prefer to 
use the {{org.apache.flink.kubernetes.operator.crd.spec.JobState}} for 2 
reasons:
1. {{crd.spec.JobState}} is mainly for reconciling in this k8s operator while 
{{api.common.JobStatus}} is used by JM in Flink to orchestrates the job. 
Thougth the reconciling process may be drived by the 
{{{}api.common.JobStatus{}}}, these 2 fields are used for different purpose and 
should be separated.
2. {{crd.spec.JobState}} currently only includes RUNNING and SUSPENDED. We 
should consider FLINK-26139 first before we draw the conclusion if 
{{org.apache.flink.api.common.JobStatus is all we need.}}


was (Author: bgeng777):
Some thoughts in doing this ticket:
As the description of this ticket said, Flink has its own 
{{org.apache.flink.api.common.JobStatus}} (including INITIALIZING, RUNNING, 
SUSPENDED, ...), which may be included in 
{{{}org.apache.flink.runtime.client.JobStatusMessage{}}}. But here I prefer to 
use the {{org.apache.flink.kubernetes.operator.crd.spec.JobState}} for 2 
reasons:
1. {{crd.spec.JobState}} is mainly for reconciling in this k8s operator while 
{{api.common.JobStatus}} is used by JM in Flink to orchestrates the job. 
Thougth the reconciling process may be drived by the 
{{{}api.common.JobStatus{}}}, these 2 fields are used for different purpose and 
should be separated.
2. {{crd.spec.JobState}} currently only includes RUNNING and SUSPENDED. More 
state will increase the complexity of the reconciling quickly, which should be 
considered carefully and only when we find some strong cases.

> Use the same enum for expected and observed jobstate (JobState / 
> JobStatus.state)
> ---------------------------------------------------------------------------------
>
>                 Key: FLINK-26178
>                 URL: https://issues.apache.org/jira/browse/FLINK-26178
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Kubernetes Operator
>            Reporter: Gyula Fora
>            Assignee: Biao Geng
>            Priority: Major
>
> We should consolidate these two and maybe even use Flink's own job state enum 
> here if makes sense



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to