dongjoon-hyun commented on code in PR #41709:
URL: https://github.com/apache/spark/pull/41709#discussion_r1240040307
##########
core/src/main/scala/org/apache/spark/util/Utils.scala:
##########
@@ -2287,6 +2287,22 @@ private[spark] object Utils extends Logging with
SparkClassUtils {
}.map(threadInfoToThreadStackTrace)
}
+ /** Return a heap dump. Used to capture dumps for the web UI */
+ def getHeapHistogram(): Array[String] = {
+ val pid = String.valueOf(ProcessHandle.current().pid())
+ val builder = new ProcessBuilder("jmap", "-histo:live", pid)
Review Comment:
@pan3793 . Here, the contact on `jmap` is just one of available binary, not
the same JDK's `jmap`.
However, I'm interested in this case. Could you make a small reproducer with
Docker image?
> Spark executor proccess respect JAVA_HOME to find $JAVA_HOME/bin/java but
the subprocess can not find jmap even it knows where JAVA_HOME is.
##########
core/src/main/scala/org/apache/spark/util/Utils.scala:
##########
@@ -2287,6 +2287,22 @@ private[spark] object Utils extends Logging with
SparkClassUtils {
}.map(threadInfoToThreadStackTrace)
}
+ /** Return a heap dump. Used to capture dumps for the web UI */
+ def getHeapHistogram(): Array[String] = {
+ val pid = String.valueOf(ProcessHandle.current().pid())
+ val builder = new ProcessBuilder("jmap", "-histo:live", pid)
Review Comment:
@pan3793 . Here, the contract on `jmap` is just one of available binary, not
the same JDK's `jmap`.
However, I'm interested in this case. Could you make a small reproducer with
Docker image?
> Spark executor proccess respect JAVA_HOME to find $JAVA_HOME/bin/java but
the subprocess can not find jmap even it knows where JAVA_HOME is.
--
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]