HeartSaVioR commented on a change in pull request #23743: [SPARK-26843][MESOS] 
Use ConfigEntry for hardcoded configs for "mesos" resource manager
URL: https://github.com/apache/spark/pull/23743#discussion_r255356818
 
 

 ##########
 File path: 
resource-managers/mesos/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosClusterScheduler.scala
 ##########
 @@ -419,22 +419,17 @@ private[spark] class MesosClusterScheduler(
 
   private def isContainerLocalAppJar(desc: MesosDriverDescription): Boolean = {
     val isLocalJar = desc.jarUrl.startsWith("local://")
-    val isContainerLocal = 
desc.conf.getOption("spark.mesos.appJar.local.resolution.mode").exists {
+    val isContainerLocal = desc.conf.get(config.APP_JAR_LOCAL_RESOLUTION_MODE) 
match {
       case "container" => true
       case "host" => false
-      case other =>
-        logWarning(s"Unknown spark.mesos.appJar.local.resolution.mode $other, 
using host.")
-        false
-      }
+    }
     isLocalJar && isContainerLocal
   }
 
   private def getDriverUris(desc: MesosDriverDescription): 
List[CommandInfo.URI] = {
-    val confUris = List(conf.getOption("spark.mesos.uris"),
-      desc.conf.getOption("spark.mesos.uris"),
-      Some(desc.conf.get(SUBMIT_PYTHON_FILES).mkString(","))).flatMap(
-      _.map(_.split(",").map(_.trim))
-    ).flatten
+    val confUris = (conf.get(config.URIS_TO_DOWNLOAD) ++
+      desc.conf.get(config.URIS_TO_DOWNLOAD) ++
+      desc.conf.get(SUBMIT_PYTHON_FILES)).toList
 
 Review comment:
   Element values will be trimmed as same as it was - ConfigBuilder handles it:
   
   
https://github.com/apache/spark/blob/dc46fb77ba70709374b4e5feec60e59e33a1ea52/core/src/main/scala/org/apache/spark/internal/config/ConfigBuilder.scala#L123-L126
   
   
https://github.com/apache/spark/blob/dc46fb77ba70709374b4e5feec60e59e33a1ea52/core/src/main/scala/org/apache/spark/internal/config/ConfigBuilder.scala#L48-L50
   
   
https://github.com/apache/spark/blob/dc46fb77ba70709374b4e5feec60e59e33a1ea52/core/src/main/scala/org/apache/spark/util/Utils.scala#L2619-L2621

----------------------------------------------------------------
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]

Reply via email to