Github user skonto commented on a diff in the pull request:
https://github.com/apache/spark/pull/22405#discussion_r217189938
--- Diff:
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/submit/KubernetesClientApplication.scala
---
@@ -254,3 +251,17 @@ 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(" +", " ")
+ .replaceAll("\\s", "-")
+ .replaceAll("[^A-Za-z0-9\\-]", "")
--- End diff --
Correct will update.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]