Maybe we could change the values of *taskmanager.numberOfTaskSlots*
and *parallelism.default
*in flink-conf.yaml of Kubernetes operator to 1, which are aligned with the
default values in Flink codebase.


Best,
Yang

Gyula Fóra <gyula.f...@gmail.com> 于2022年10月26日周三 15:17写道:

> Hi!
>
> I agree that this might be confusing but let me explain what happened.
>
> In the operator you can define default flink configuration. Currently it
> is
> https://github.com/apache/flink-kubernetes-operator/blob/main/helm/flink-kubernetes-operator/conf/flink-conf.yaml
> It contains numberOfTaskSlots=2.
>
> This is more just an example of how to control default cluster
> configuration from the operator. Users generally define numberOfTaskSlots
> for every Flink resource in the flinkConfiguration setting, that would
> override this default.
>
> You are also free to change the operator side default flink conf to not
> set this, then you will have 1. In any case nobody is running real
> applications with 1 task slots / parallelism so this hasn't caused any
> problems so far :)
>
> Cheers,
> Gyula
>
> On Wed, Oct 26, 2022 at 7:20 AM Liting Liu (litiliu) <liti...@cisco.com>
> wrote:
>
>> hi:
>> I'm  trying to deploy a flink job with flink-operaotor. The
>> flink-operator's version is 1.2.0. And the yaml i use is here:
>> ````
>> apiVersion: flink.apache.org/v1beta1
>> kind: FlinkDeployment
>> metadata:
>>   name: basic-example
>> spec:
>>   image: flink:1.15
>>   flinkVersion: v1_15
>>   flinkConfiguration:
>>   serviceAccount: flink
>>   jobManager:
>>     resource:
>>       memory: "2048m"
>>       cpu: 1
>>   taskManager:
>>     resource:
>>       memory: "2048m"
>>       cpu: 1
>>   job:
>>     jarURI: local:///opt/flink/examples/streaming/StateMachineExample.jar
>>     parallelism: 2
>>     upgradeMode: stateless
>> ````
>>    But i found in the generated configMap, there was a field named
>> "taskmanager.numberOfTaskSlots" was set to 2.  Which is very weird, since
>> that field was not defined by user.  And according to flink doc the
>> default value of "taskmanager.numberOfTaskSlots" should be 1.
>>
>

Reply via email to