From 7616ddf5b85d64900b25485eed1dd6ed69c3ec92 Mon Sep 17 00:00:00 2001 From: Cheng Pan Date: Fri, 7 Jun 2024 20:01:32 +0800 Subject: [PATCH] [SPARK-48565][UI] Fix thread dump display in UI --- 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 7a0c69e294883..6ae1dce57f31c 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 {