srowen commented on a change in pull request #23599: [SPARK-24793][K8s] Enhance
spark-submit for app management
URL: https://github.com/apache/spark/pull/23599#discussion_r254712604
##########
File path: core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala
##########
@@ -1346,6 +1360,24 @@ private[spark] object SparkSubmitUtils {
}
}
+ private[deploy] def getSparkSubmitOperationsClient(master: String):
+ SparkSubmitOperationsClient = {
+ val loader = Utils.getContextOrSparkClassLoader
+ val serviceLoaders =
+ ServiceLoader.load(classOf[SparkSubmitOperationsClient], loader)
+ .asScala
+ .filter(_.isValid(master))
+ if (serviceLoaders.size > 1) {
+ throw new SparkException(
+ s"Multiple external SparkSubmitOperations clients registered.")
+ }
+ val client = serviceLoaders.headOption
+
+ client match {
+ case Some(c) => c
+ case _ => throw new IllegalArgumentException("Could not parse Master
URL: '" + master + "'")
Review comment:
This could use string interpolation
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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]