Skip to content

Commit a080131

Browse files
Adding check for G1GC and modifying recommendation for enable G1GC or ParallelGC
1 parent 927c7c8 commit a080131

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

app/com/linkedin/drelephant/spark/heuristics/ExecutorGcHeuristic.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,10 @@ object ExecutorGcHeuristic {
104104
throw new Exception("No executor information available.")
105105
}
106106

107-
val isParallelGCEnabled: Boolean = appConfigurationProperties.getOrElse("spark.executor.extraJavaOptions","").contains("XX:+UseParallelGC")
108-
val parallelGcRecommendation: String = if (isParallelGCEnabled) "" else "Enable ParallelGC using spark.executor.extraJavaOptions."
107+
val sparkExecutorExtraJavaOptions = appConfigurationProperties.getOrElse("spark.executor.extraJavaOptions","")
108+
val isParallelGCEnabled: Boolean = sparkExecutorExtraJavaOptions.contains("XX:+UseParallelGC")
109+
val isG1GCenabled: Boolean = sparkExecutorExtraJavaOptions.contains("XX:+UseG1GC")
110+
val gcRecommendation: String = if (isParallelGCEnabled || isG1GCenabled) "" else "Enable ParallelGC or G1GC using spark.executor.extraJavaOptions."
109111

110112
lazy val appConfigurationProperties: Map[String, String] =
111113
data.appConfigurationProperties

app/views/help/spark/helpExecutorGcHeuristic.scala.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<h3>Suggestions</h3>
2020
<ul>
2121
<li>We recommend increasing the executor memory.</li>
22-
<li>Enabling ParallelGC using spark.executor.extraJavaOptions could help.</li>
22+
<li>Enabling G1GC or ParallelGC using spark.executor.extraJavaOptions could help.</li>
2323
<ul>
2424
<li>User can enable G1GC or ParallelGC by adding <b>-XX:+UseG1GC</b> or <b>-XX:+UseParallelGC</b> respectively to Spark configuration spark.executor.extraJavaOptions</li>
2525
</ul>

0 commit comments

Comments
 (0)