kiszk commented on a change in pull request #22874: [SPARK-25865][CORE] Add GC
information to ExecutorMetrics
URL: https://github.com/apache/spark/pull/22874#discussion_r245553631
##########
File path:
core/src/main/scala/org/apache/spark/metrics/ExecutorMetricType.scala
##########
@@ -99,6 +102,68 @@ case object ProcessTreeMetrics extends ExecutorMetricType {
}
}
+case object GarbageCollectionMetrics extends ExecutorMetricType with Logging {
+ import GC_TYPE._
+ override val names = Seq(
+ "MinorGCCount",
+ "MinorGCTime",
+ "MajorGCCount",
+ "MajorGCTime"
+ )
+
+ private lazy val supported: Boolean = {
+ val shouldLogStageExecutorGCMetrics =
+ SparkEnv.get.conf.get(config.EVENT_LOG_PROCESS_TREE_METRICS)
+ val supportedVendor = System.getProperty("java.vendor").contains("Oracle")
||
+ System.getProperty("java.vendor").contains("OpenJDK")
+ shouldLogStageExecutorGCMetrics && supportedVendor
Review comment:
While `getGarbageCollectorMXBeans()` is a part of stardard API, why does
this PR allow only two JVMs vendor to enable this?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]