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 53d65fd12dd9 [SPARK-48565][UI] Fix thread dump display in UI
53d65fd12dd9 is described below

commit 53d65fd12dd9231139188227ef9040d40d759021
Author: Cheng Pan <[email protected]>
AuthorDate: Tue Jun 11 11:28:50 2024 +0800

    [SPARK-48565][UI] Fix thread dump display in UI
    
    ### What changes were proposed in this pull request?
    
    Thread dump display in UI is not pretty as before, this is side-effect 
introduced by SPARK-44863
    
    ### Why are the changes needed?
    
    Restore thread dump display in UI.
    
    ### Does this PR introduce _any_ user-facing change?
    
    Yes, it only affects UI display.
    
    ### How was this patch tested?
    
    Current master:
    <img width="1545" alt="master-branch" 
src="https://github.com/apache/spark/assets/26535726/5c6fd770-467f-481c-a635-2855a2853633";>
    
    With this patch applied:
    <img width="1542" alt="Xnip2024-06-07_20-00-38" 
src="https://github.com/apache/spark/assets/26535726/3998c2aa-671f-4921-8444-b7bca8667202";>
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No
    
    Closes #46916 from pan3793/SPARK-48565.
    
    Authored-by: Cheng Pan <[email protected]>
    Signed-off-by: Kent Yao <[email protected]>
---
 core/src/main/scala/org/apache/spark/status/api/v1/api.scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/src/main/scala/org/apache/spark/status/api/v1/api.scala 
b/core/src/main/scala/org/apache/spark/status/api/v1/api.scala
index 7a0c69e29488..6ae1dce57f31 100644
--- a/core/src/main/scala/org/apache/spark/status/api/v1/api.scala
+++ b/core/src/main/scala/org/apache/spark/status/api/v1/api.scala
@@ -510,7 +510,7 @@ case class StackTrace(elems: Seq[String]) {
   override def toString: String = elems.mkString
 
   def html: NodeSeq = {
-    val withNewLine = elems.foldLeft(NodeSeq.Empty) { (acc, elem) =>
+    val withNewLine = elems.map(_.stripLineEnd).foldLeft(NodeSeq.Empty) { 
(acc, elem) =>
       if (acc.isEmpty) {
         acc :+ Text(elem)
       } else {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to