Skip to content

Commit

Permalink
Adding check for G1GC and modifying recommendation for enable G1GC or…
Browse files Browse the repository at this point in the history
… ParallelGC
  • Loading branch information
ShubhamGupta29 committed Oct 14, 2018
1 parent 927c7c8 commit a080131
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,10 @@ object ExecutorGcHeuristic {
throw new Exception("No executor information available.")
}

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

lazy val appConfigurationProperties: Map[String, String] =
data.appConfigurationProperties
Expand Down
2 changes: 1 addition & 1 deletion app/views/help/spark/helpExecutorGcHeuristic.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<h3>Suggestions</h3>
<ul>
<li>We recommend increasing the executor memory.</li>
<li>Enabling ParallelGC using spark.executor.extraJavaOptions could help.</li>
<li>Enabling G1GC or ParallelGC using spark.executor.extraJavaOptions could help.</li>
<ul>
<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>
</ul>
Expand Down

0 comments on commit a080131

Please sign in to comment.