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



##########
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:
       @dongjoon-hyun Thanks for your findings. I've updated and checked 
against JDK8, 11, and 17.  also cc @attilapiros 




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