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_r339307874
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/clusterframework/BootstrapToolsTest.java
##########
@@ -143,13 +143,29 @@ public void testSubstituteConfigKeyPrefix() {
@Test
public void testGetTaskManagerShellCommand() {
final Configuration cfg = new Configuration();
+ cfg.setBoolean(CoreOptions.FLINK_JVM_DEFAULT_GC_LOGGING, true);
final ContaineredTaskManagerParameters containeredParams =
new ContaineredTaskManagerParameters(1024, 768, 256, 4,
new HashMap<String, String>());
// no logging, with/out krb5
final String java = "$JAVA_HOME/bin/java";
final String jvmmem = "-Xms768m -Xmx768m
-XX:MaxDirectMemorySize=256m";
+ final String defaultGCLoggingOpts =
+ "-Xloggc:./logs/gc.log " +
+ "-XX:+PrintGCApplicationStoppedTime " +
+ "-XX:+PrintGCDetails " +
+ "-XX:+PrintGCDateStamps " +
+ "-XX:+UseGCLogFileRotation " +
+ "-XX:NumberOfGCLogFiles=10 " +
+ "-XX:GCLogFileSize=10M " +
+ "-XX:+PrintPromotionFailure " +
+ "-XX:+PrintGCCause";
+ final String heapdumpOpts =
+ "-XX:+HeapDumpOnOutOfMemoryError " +
+
"-XX:HeapDumpPath=/tmp/test-flink-taskmanager-heapdump.hprof " +
+ "-XX:OnOutOfMemoryError=\"echo -e
'OutOfMemoryError! Killing current process %p...\nCheck gc logs and heapdump
file(/tmp/test-flink-taskmanager-heapdump.hprof) for details.' > " +
+ "./logs/taskmanager.err; kill -9 %p\"";
Review comment:
Can we substitute this with `getGCLoggingOpts` and `getHeapdumpOpts`?
----------------------------------------------------------------
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