You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/12/13 16:04:03 UTC

[GitHub] [flink] tillrohrmann commented on a change in pull request #10545: [FLINK-15197][kubernetes] Add resource related config options to dynamical properties for Kubernetes

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:
users@infra.apache.org


With regards,
Apache Git Services