mridulm commented on code in PR #43107:
URL: https://github.com/apache/spark/pull/43107#discussion_r1337478470


##########
core/src/main/scala/org/apache/spark/util/Utils.scala:
##########
@@ -2149,8 +2149,7 @@ private[spark] object Utils
 
   /** Return a heap dump. Used to capture dumps for the web UI */
   def getHeapHistogram(): Array[String] = {
-    // From Java 9+, we can use 'ProcessHandle.current().pid()'
-    val pid = getProcessName().split("@").head
+    val pid = String.valueOf(ProcessHandle.current().pid())

Review Comment:
   DISCUSS: the new path can result in an Exception being thrown as per 
documentation.
   It is not clear if this can happen for the platforms we support - do we know 
more about this @dongjoon-hyun ?



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