// jobmanager publicstaticfinal ConfigOption<Double> JOB_MANAGER_CPU_REQUEST_FACTOR = key("kubernetes.jobmanager.cpu.request-factor") .doubleType() .defaultValue(1.0) .withDescription( "The request factor of cpu used by job manager. " + "The resources request cpu will be set to cpu * request-factor.");
publicstaticfinal ConfigOption<Double> JOB_MANAGER_MEMORY_REQUEST_FACTOR = key("kubernetes.jobmanager.memory.request-factor") .doubleType() .defaultValue(1.0) .withDescription( "The request factor of memory used by job manager. " + "The resources request memory will be set to memory * request-factor.");
// taskmanager publicstaticfinal ConfigOption<Double> TASK_MANAGER_CPU_REQUEST_FACTOR = key("kubernetes.taskmanager.cpu.request-factor") .doubleType() .defaultValue(1.0) .withDescription( "The request factor of cpu used by task manager. " + "The resources request cpu will be set to cpu * request-factor.");
publicstaticfinal ConfigOption<Double> TASK_MANAGER_MEMORY_REQUEST_FACTOR = key("kubernetes.taskmanager.memory.request-factor") .doubleType() .defaultValue(1.0) .withDescription( "The request factor of memory used by task manager. " + "The resources request memory will be set to memory * request-factor.");
publicdoublegetJobManagerCPURequestFactor(){ finaldouble requestFactor = flinkConfig.getDouble(KubernetesConfigOptions.JOB_MANAGER_CPU_REQUEST_FACTOR); checkArgument( requestFactor <= 1, "%s should be less than or equal to 1.", KubernetesConfigOptions.JOB_MANAGER_CPU_REQUEST_FACTOR.key()); return requestFactor; }
publicdoublegetJobManagerMemoryRequestFactor(){ finaldouble requestFactor = flinkConfig.getDouble(KubernetesConfigOptions.JOB_MANAGER_MEMORY_REQUEST_FACTOR); checkArgument( requestFactor <= 1, "%s should be less than or equal to 1.", KubernetesConfigOptions.JOB_MANAGER_MEMORY_REQUEST_FACTOR.key()); return requestFactor; }
KubernetesTaskManagerParameters.java
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
publicdoublegetTaskManagerCPURequestFactor(){ finaldouble requestFactor = flinkConfig.getDouble(KubernetesConfigOptions.TASK_MANAGER_CPU_REQUEST_FACTOR); checkArgument( requestFactor <= 1, "%s should be less than or equal to 1.", KubernetesConfigOptions.TASK_MANAGER_CPU_REQUEST_FACTOR.key()); return requestFactor; }
publicdoublegetTaskManagerMemoryRequestFactor(){ finaldouble requestFactor = flinkConfig.getDouble(KubernetesConfigOptions.TASK_MANAGER_MEMORY_REQUEST_FACTOR); checkArgument( requestFactor <= 1, "%s should be less than or equal to 1.", KubernetesConfigOptions.TASK_MANAGER_MEMORY_REQUEST_FACTOR.key()); return requestFactor; }