Github user skonto commented on a diff in the pull request:
https://github.com/apache/spark/pull/22405#discussion_r217213999
--- Diff:
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/submit/KubernetesClientApplication.scala
---
@@ -254,3 +251,18 @@ private[spark] class KubernetesClientApplication
extends SparkApplication {
}
}
}
+
+private[spark] object KubernetesClientApplication {
+
+ def getAppName(conf: SparkConf): String =
conf.getOption("spark.app.name").getOrElse("spark")
+
+ def getResourceNamePrefix(appName: String): String = {
+ val launchTime = System.currentTimeMillis()
+ s"$appName-$launchTime"
+ .toLowerCase
+ .replaceAll("\\s+", "-")
+ .toLowerCase.replaceAll("\\.", "-")
--- End diff --
keep replacement.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]