You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by do...@apache.org on 2025/07/21 04:56:50 UTC
(spark) branch master updated: [SPARK-52900][CORE] Use `SparkStringUtils.stringToSeq` in `FsHistoryProvider`
This is an automated email from the ASF dual-hosted git repository.
dongjoon 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 216394081072 [SPARK-52900][CORE] Use `SparkStringUtils.stringToSeq` in `FsHistoryProvider`
216394081072 is described below
commit 2163940810729cae7258c91d7b8afeea49fdb1cb
Author: Dongjoon Hyun <do...@apache.org>
AuthorDate: Sun Jul 20 21:56:40 2025 -0700
[SPARK-52900][CORE] Use `SparkStringUtils.stringToSeq` in `FsHistoryProvider`
### What changes were proposed in this pull request?
This PR aims to use `SparkStringUtils.stringToSeq` in `FsHistoryProvider` instead of the `private` duplicated method.
### Why are the changes needed?
To simplify the codebase by removing the duplication.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Pass the CIs.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #51587 from dongjoon-hyun/SPARK-52900.
Authored-by: Dongjoon Hyun <do...@apache.org>
Signed-off-by: Dongjoon Hyun <do...@apache.org>
---
.../scala/org/apache/spark/deploy/history/FsHistoryProvider.scala | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala b/core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala
index ad372a414c00..af6d959011c7 100644
--- a/core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala
+++ b/core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala
@@ -54,6 +54,7 @@ import org.apache.spark.status.api.v1.{ApplicationAttemptInfo, ApplicationInfo}
import org.apache.spark.ui.SparkUI
import org.apache.spark.util.{CallerContext, Clock, JsonProtocol, SystemClock, ThreadUtils, Utils}
import org.apache.spark.util.ArrayImplicits._
+import org.apache.spark.util.SparkStringUtils.stringToSeq
import org.apache.spark.util.kvstore._
/**
@@ -319,13 +320,6 @@ private[history] class FsHistoryProvider(conf: SparkConf, clock: Clock)
override def getLastUpdatedTime(): Long = lastScanTime.get()
- /**
- * Split a comma separated String, filter out any empty items, and return a Sequence of strings
- */
- private def stringToSeq(list: String): Seq[String] = {
- list.split(',').map(_.trim).filter(_.nonEmpty).toImmutableArraySeq
- }
-
override def getAppUI(appId: String, attemptId: Option[String]): Option[LoadedAppUI] = {
val app = try {
load(appId)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org