Skip to content

Commit f5f842c

Browse files
WenboZhaoCurtis Howard
authored andcommitted
Fix application id to use correct cook application id for enabling ssl
(cherry picked from commit 0063b83) (cherry picked from commit 1e2a60e)
1 parent 562c644 commit f5f842c

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

cook/src/main/scala/org/apache/spark/scheduler/cluster/cook/CoarseCookSchedulerBackend.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ class CoarseCookSchedulerBackend(
129129
if (!job.isSuccess && !isAborted) {
130130
totalFailures += 1
131131
logWarning(s"Job ${job.getUUID} has died. " +
132-
s"Failure ($totalFailures/$schedulerConf.getMaximumExecutorFailures)")
132+
s"Failure ($totalFailures/${schedulerConf.getMaximumExecutorFailures})")
133133
jobIds -= job.getUUID
134134
if (totalFailures >= schedulerConf.getMaximumExecutorFailures) {
135135
// TODO should we abort the outstanding tasks now?

resource-managers/mesos/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosCoarseGrainedSchedulerBackend.scala

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,8 @@ private[spark] class MesosCoarseGrainedSchedulerBackend(
264264
val uri = conf.getOption("spark.executor.uri")
265265
.orElse(Option(System.getenv("SPARK_EXECUTOR_URI")))
266266

267+
val cookAppId = conf.get("spark.cook.applicationId", applicationId())
268+
267269
if (uri.isEmpty) {
268270
val executorSparkHome = conf.getOption("spark.mesos.executor.home")
269271
.orElse(sc.getSparkHome())
@@ -278,7 +280,7 @@ private[spark] class MesosCoarseGrainedSchedulerBackend(
278280
s" --executor-id $taskId" +
279281
s" --hostname ${executorHostname(offer)}" +
280282
s" --cores $numCores" +
281-
s" --app-id $appId")
283+
s" --app-id $cookAppId")
282284
} else {
283285
// Grab everything to the first '.'. We'll use that and '*' to
284286
// glob the directory "correctly".
@@ -291,7 +293,8 @@ private[spark] class MesosCoarseGrainedSchedulerBackend(
291293
s" --hostname ${executorHostname(offer)}" +
292294
s" --cores $numCores" +
293295
s" --app-id $appId")
294-
command.addUris(CommandInfo.URI.newBuilder().setValue(uri.get).setCache(useFetcherCache))
296+
s" --app-id $cookAppId")
297+
command.addUris(CommandInfo.URI.newBuilder().setValue(uri.get))
295298
}
296299

297300
conf.getOption("spark.mesos.uris").foreach(setupUris(_, command, useFetcherCache))

0 commit comments

Comments
 (0)