attilapiros commented on a change in pull request #34846:
URL: https://github.com/apache/spark/pull/34846#discussion_r770903547



##########
File path: core/src/main/scala/org/apache/spark/util/Utils.scala
##########
@@ -3204,6 +3205,22 @@ private[spark] object Utils extends Logging {
     }
     files.toSeq
   }
+
+  /**
+   * Get the value of -XX:G1HeapRegionSize if we are using G1 GC,
+   * otherwise just return None
+   */
+  val G1HeapRegionSize: Option[Long] = {
+    Try {
+      val diagnostic = ManagementFactoryHelper.getDiagnosticMXBean()

Review comment:
       Great findings! We need to test this on other JVM versions too.




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to