Skip to content

Commit 0063b83

Browse files
committed
Fix application id to use correct cook application id for enabling ssl
1 parent 2c9186b commit 0063b83

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
@@ -216,6 +216,8 @@ private[spark] class MesosCoarseGrainedSchedulerBackend(
216216
val uri = conf.getOption("spark.executor.uri")
217217
.orElse(Option(System.getenv("SPARK_EXECUTOR_URI")))
218218

219+
val cookAppId = conf.get("spark.cook.applicationId", applicationId())
220+
219221
if (uri.isEmpty) {
220222
val executorSparkHome = conf.getOption("spark.mesos.executor.home")
221223
.orElse(sc.getSparkHome())
@@ -230,7 +232,7 @@ private[spark] class MesosCoarseGrainedSchedulerBackend(
230232
s" --executor-id $taskId" +
231233
s" --hostname ${executorHostname(offer)}" +
232234
s" --cores $numCores" +
233-
s" --app-id $appId")
235+
s" --app-id $cookAppId")
234236
} else {
235237
// Grab everything to the first '.'. We'll use that and '*' to
236238
// glob the directory "correctly".
@@ -243,7 +245,8 @@ private[spark] class MesosCoarseGrainedSchedulerBackend(
243245
s" --hostname ${executorHostname(offer)}" +
244246
s" --cores $numCores" +
245247
s" --app-id $appId")
246-
command.addUris(CommandInfo.URI.newBuilder().setValue(uri.get).setCache(useFetcherCache))
248+
s" --app-id $cookAppId")
249+
command.addUris(CommandInfo.URI.newBuilder().setValue(uri.get))
247250
}
248251

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

0 commit comments

Comments
 (0)