This is an automated email from the ASF dual-hosted git repository.

yao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new 7818f47ca2f [SPARK-45086][UI] Display hexadecimal for thread lock hash 
code
7818f47ca2f is described below

commit 7818f47ca2fef37fe57888a6fdfb80c778f7339c
Author: Kent Yao <y...@apache.org>
AuthorDate: Thu Sep 7 15:18:28 2023 +0800

    [SPARK-45086][UI] Display hexadecimal for thread lock hash code
    
    ### What changes were proposed in this pull request?
    
    This PR fixes the stringify method for MonitorInfo/LockInfo to use 
`toString` which contains an extra step of Integer.toHexString.
    
    ### Why are the changes needed?
    
    to be consistent with the lock-holder
    
    ### Does this PR introduce _any_ user-facing change?
    
    yes, UI and the response for the rest 
API(/applications/[app-id]/executors/[executor-id]/threads) change
    
    ### How was this patch tested?
    
    verified locally
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    no
    
    Closes #42826 from yaooqinn/SPARK-45086.
    
    Authored-by: Kent Yao <y...@apache.org>
    Signed-off-by: Kent Yao <y...@apache.org>
---
 core/src/main/scala/org/apache/spark/util/Utils.scala | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/core/src/main/scala/org/apache/spark/util/Utils.scala 
b/core/src/main/scala/org/apache/spark/util/Utils.scala
index 7e4d9b78af2..149071ee1b6 100644
--- a/core/src/main/scala/org/apache/spark/util/Utils.scala
+++ b/core/src/main/scala/org/apache/spark/util/Utils.scala
@@ -2108,10 +2108,8 @@ private[spark] object Utils
   private implicit class Lock(lock: LockInfo) {
     def lockString: String = {
       lock match {
-        case monitor: MonitorInfo =>
-          s"Monitor(${lock.getClassName}@${monitor.getIdentityHashCode})"
-        case _ =>
-          s"Lock(${lock.getClassName}@${lock.getIdentityHashCode})"
+        case monitor: MonitorInfo => s"Monitor(${monitor.toString})"
+        case _ => s"Lock(${lock.toString})"
       }
     }
   }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to