pan3793 commented on code in PR #52665:
URL: https://github.com/apache/spark/pull/52665#discussion_r2444926039
##########
core/src/main/scala/org/apache/spark/util/Utils.scala:
##########
@@ -2112,7 +2112,8 @@ private[spark] object Utils
/** Return a heap dump. Used to capture dumps for the web UI */
def getHeapHistogram(): Array[String] = {
val pid = String.valueOf(ProcessHandle.current().pid())
- val jmap = System.getProperty("java.home") + "/bin/jmap"
+ val jmap = Option(System.getenv("JAVA_HOME"))
Review Comment:
@sarutak the suggestted approach is simpler but will load all env
vars/properties into a new map, which say, is not as efficient as Java's method.
--
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]