Skip to content

Commit 0ddb04a

Browse files
hkothariCurtis Howard
authored andcommitted
Adding support for downloading logs directly from Spark UI (apache#23)
(cherry picked from commit 38fa491) (cherry picked from commit 5ff2e10)
1 parent 49a3460 commit 0ddb04a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,13 +306,20 @@ class CoarseCookSchedulerBackend(
306306
s"[ -z $$KEEP_SPARK_LOCAL_TARS ] || rm -f $$(basename $uri)"
307307
}
308308

309+
val logUrlCommand = Seq(
310+
"export BASE_SPARK_LOG_URL=\"http://`hostname`:5051/files/download?path=$MESOS_SANDBOX\"",
311+
"export SPARK_LOG_URL_STDERR=\"$BASE_SPARK_LOG_URL/stderr\"",
312+
"export SPARK_LOG_URL_STDOUT=\"$BASE_SPARK_LOG_URL/stdout\""
313+
)
314+
309315
val commandSeq =
310316
debugCommand ++
311317
envSettingCommand ++
312318
uriFetchCommand ++
313319
shippedTarballsCommand ++
314320
remoteConfFetchCommand ++
315321
keystorePullCommand.map(Seq(_)).getOrElse(Seq[String]()) ++
322+
logUrlCommand ++
316323
Seq("set", commandString) ++
317324
cleanup
318325

0 commit comments

Comments
 (0)