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

Biao Geng edited comment on FLINK-27329 at 5/12/22 3:35 AM:
------------------------------------------------------------

[~wangyang0918] I see your point that if we set default value of some fields 
(e.g. parallism) in the operator, we cannot adopt flink's default value as our 
default value in the {*}{{*}}Spec\{*} will be used. 

For parallism and cpu, l will not add default value in our k8s operator. 

Besides, it is worthwhile to mention that in our FlinkConfigBuilder, we will 
verify if parallism is larger than 0, so we do not need to worry about it. But 
for setResource, we do not handle cases when cpu or memory is null. As a 
result, the zero cpu value may be set.  I improve it a little in the 
[PR|https://github.com/apache/flink-kubernetes-operator/pull/204].


was (Author: bgeng777):
[~wangyang0918] I see your point that if we set default value of some fields 
(e.g. parallism) in the operator, we cannot adopt flink's default value as our 
default value in the *{*}Spec{*} will be used. 

For parallism and cpu, l will not add default value in our k8s operator. 

Besides, it is worthwhile to mention that in our FlinkConfigBuilder, we will 
verify if parallism is larger than 0, so we do not need to worry about it. But 
for setResource, we do not handle cases when cpu or memory is null. I improve 
it a little in the 
[PR|https://github.com/apache/flink-kubernetes-operator/pull/204].

> Add default value of replica of JM pod and not declare it in example yamls
> --------------------------------------------------------------------------
>
>                 Key: FLINK-27329
>                 URL: https://issues.apache.org/jira/browse/FLINK-27329
>             Project: Flink
>          Issue Type: Improvement
>          Components: Kubernetes Operator
>            Reporter: Biao Geng
>            Assignee: Biao Geng
>            Priority: Critical
>             Fix For: kubernetes-operator-1.0.0
>
>
> Currently, we do not explicitly set the default value of `replica` in 
> `JobManagerSpec`. As a result, Java sets the default value to be zero. 
> Besides, in our examples, we explicitly declare `replica` in `JobManagerSpec` 
> to be 1. 
> After a deeper look when debugging the exception thrown in FLINK-27310, we 
> find it would be better to set the default value to 1 for the `replica` field 
> and remove the declaration in examples due to following reasons:
> 1. A normal Session or Application cluster should have at least one JM. The 
> current default value, zero, does not follow the common case.
> 2. One JM can work for k8s HA mode as well and if users really want to launch 
> a standby JM for faster recorvery, they can declare the value of `replica` 
> field in the yaml file. In examples, we just use the new default value(i.e. 
> 1), which should be fine.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to