There was an error while loading. Please reload this page.
1 parent a0ef3a4 commit 284029bCopy full SHA for 284029b
core/src/main/scala/org/apache/spark/util/Utils.scala
@@ -2289,7 +2289,8 @@ private[spark] object Utils extends Logging with SparkClassUtils {
2289
2290
/** Return a heap dump. Used to capture dumps for the web UI */
2291
def getHeapHistogram(): Array[String] = {
2292
- val pid = String.valueOf(ProcessHandle.current().pid())
+ // From Java 9+, we can use 'ProcessHandle.current().pid()'
2293
+ val pid = getProcessName().split("@").head
2294
val builder = new ProcessBuilder("jmap", "-histo:live", pid)
2295
builder.redirectErrorStream(true)
2296
val p = builder.start()
0 commit comments