tillrohrmann commented on a change in pull request #9703: [FLINK-14038]Add default GC options for flink on yarn to facilitate debugging URL: https://github.com/apache/flink/pull/9703#discussion_r339307928
########## File path: flink-yarn/src/main/java/org/apache/flink/yarn/YarnClusterDescriptor.java ########## @@ -1588,16 +1589,27 @@ private void addPluginsFoldersToShipFiles(Collection<File> effectiveShipFiles) { } } - ContainerLaunchContext setupApplicationMasterContainer( + protected ContainerLaunchContext setupApplicationMasterContainer( + String appId, String yarnClusterEntrypoint, boolean hasLogback, boolean hasLog4j, boolean hasKrb5, int jobManagerMemoryMb) { // ------------------ Prepare Application Master Container ------------------------------ + String javaOpts = ""; + // Add default gc logging options if enabled + javaOpts += BootstrapTools.getGCLoggingOpts(ApplicationConstants.LOG_DIR_EXPANSION_VAR, flinkConfiguration); + // Add default heap dump options if enabled + javaOpts += " " + BootstrapTools.getHeapdumpOpts( + appId, + "jobmanager", + ApplicationConstants.LOG_DIR_EXPANSION_VAR, + flinkConfiguration); // respect custom JVM options in the YAML file - String javaOpts = flinkConfiguration.getString(CoreOptions.FLINK_JVM_OPTIONS); + javaOpts += " " + flinkConfiguration.getString(CoreOptions.FLINK_JVM_OPTIONS); Review comment: This looks like duplicate code which we also have in `BootstrapTools.getTaskManagerShellCommand`. Please deduplicate. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services