srowen commented on a change in pull request #23546: [SPARK-23153][K8s] Support
client dependencies with a Hadoop Compatible File System
URL: https://github.com/apache/spark/pull/23546#discussion_r276351066
##########
File path:
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/KubernetesUtils.scala
##########
@@ -209,4 +215,70 @@ private[spark] object KubernetesUtils extends Logging {
Hex.encodeHexString(random) + time
}
+ /**
+ * Upload files and modify their uris
+ */
+ def uploadAndTransformFileUris(fileUris: Iterable[String], conf:
Option[SparkConf] = None)
+ : Iterable[String] = {
+ fileUris.map { uri =>
+ uploadFileUri(uri, conf)
+ }
+ }
+
+ private def isLocalDependency(uri: URI): Boolean = {
+ Option(uri.getScheme).getOrElse("file") == "file"
Review comment:
You could:
```
uri.getScheme match {
case null | "file" => true
case _ => false
}
```
No big deal of course
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]