Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/21378#discussion_r191310691
--- Diff:
resource-managers/mesos/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosClusterScheduler.scala
---
@@ -418,17 +417,33 @@ private[spark] class MesosClusterScheduler(
envBuilder.build()
}
+ private def isContainerLocalAppJar(desc: MesosDriverDescription):
Boolean = {
+ val isLocalJar = desc.jarUrl.startsWith("local://")
+ val isContainerLocal =
desc.conf.getOption("spark.mesos.appJar.local.resolution.mode").exists {
+ case "container" => true
+ case "host" => false
+ case other =>
+ logWarning(s"Unknown spark.mesos.appJar.local.resolution.mode
$other, using host.")
+ false
+ }
--- End diff --
Can we do:
```scala
desc.conf.getOption("spark.mesos.appJar.local.resolution.mode") match {
case Some("container") => true
case Some("host") | None => false
case Some(other) =>
...
}
```
?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]