tillrohrmann commented on a change in pull request #10545: 
[FLINK-15197][kubernetes] Add resource related config options to dynamical 
properties for Kubernetes
URL: https://github.com/apache/flink/pull/10545#discussion_r357715261
 
 

 ##########
 File path: 
flink-kubernetes/src/main/java/org/apache/flink/kubernetes/utils/KubernetesUtils.java
 ##########
 @@ -163,16 +163,21 @@ public static String getTaskManagerStartCommand(
                        String mainClass,
                        @Nullable String mainArgs) {
                final TaskExecutorResourceSpec taskExecutorResourceSpec = 
tmParams.getTaskExecutorResourceSpec();
+               final String jvmMemOpts = 
TaskExecutorResourceUtils.generateJvmParametersStr(taskExecutorResourceSpec);
+               String args = 
TaskExecutorResourceUtils.generateDynamicConfigsStr(taskExecutorResourceSpec);
+               if (mainArgs != null) {
+                       args += " " + mainArgs;
+               }
                return getCommonStartCommand(
                        flinkConfig,
                        ClusterComponent.TASK_MANAGER,
-                       
TaskExecutorResourceUtils.generateJvmParametersStr(taskExecutorResourceSpec),
+                       jvmMemOpts,
                        configDirectory,
                        logDirectory,
                        hasLogback,
                        hasLog4j,
                        mainClass,
-                       mainArgs
+                       args
 
 Review comment:
   This is unrelated to this PR but maybe one could think about consolidating 
the methods `KubernetesUtils#getCommonStartCommand` and 
`BootstrapTool#getTaskManagerShellCommand`. They look very similar.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to