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 d5ca61692c34 [SPARK-46940][CORE] Remove unused 
`updateSparkConfigFromProperties` and `isAbsoluteURI` in `o.a.s.u.Utils`
d5ca61692c34 is described below

commit d5ca61692c34449bc602db6cf0919010ec5a50a3
Author: panbingkun <panbing...@baidu.com>
AuthorDate: Thu Feb 1 09:30:07 2024 -0800

    [SPARK-46940][CORE] Remove unused `updateSparkConfigFromProperties` and 
`isAbsoluteURI` in `o.a.s.u.Utils`
    
    ### What changes were proposed in this pull request?
    The pr aims to remove unused `updateSparkConfigFromProperties` and 
`isAbsoluteURI` in `o.a.s.u.Utils`.
    
    ### Why are the changes needed?
    Keep the code cleanly.
    
    ### Does this PR introduce _any_ user-facing change?
    No.
    
    ### How was this patch tested?
    Pass GA.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    No.
    
    Closes #44979 from panbingkun/SPARK-46940.
    
    Authored-by: panbingkun <panbing...@baidu.com>
    Signed-off-by: Dongjoon Hyun <dh...@apple.com>
---
 .../main/scala/org/apache/spark/util/Utils.scala   | 25 ----------------------
 1 file changed, 25 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 a55539c0a235..b49f97aed05e 100644
--- a/core/src/main/scala/org/apache/spark/util/Utils.scala
+++ b/core/src/main/scala/org/apache/spark/util/Utils.scala
@@ -1884,17 +1884,6 @@ private[spark] object Utils
     }
   }
 
-  /** Check whether a path is an absolute URI. */
-  def isAbsoluteURI(path: String): Boolean = {
-    try {
-      val uri = new URI(path: String)
-      uri.isAbsolute
-    } catch {
-      case _: URISyntaxException =>
-        false
-    }
-  }
-
   /** Return all non-local paths from a comma-separated list of paths. */
   def nonLocalPaths(paths: String, testWindows: Boolean = false): 
Array[String] = {
     val windows = isWindows || testWindows
@@ -1931,20 +1920,6 @@ private[spark] object Utils
     path
   }
 
-  /**
-   * Updates Spark config with properties from a set of Properties.
-   * Provided properties have the highest priority.
-   */
-  def updateSparkConfigFromProperties(
-      conf: SparkConf,
-      properties: Map[String, String]) : Unit = {
-    properties.filter { case (k, v) =>
-      k.startsWith("spark.")
-    }.foreach { case (k, v) =>
-      conf.set(k, v)
-    }
-  }
-
   /**
    * Implements the same logic as JDK `java.lang.String#trim` by removing 
leading and trailing
    * non-printable characters less or equal to '\u0020' (SPACE) but preserves 
natural line


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

Reply via email to