Skip to content

Commit

Permalink
Adding support for downloading logs directly from Spark UI (apache#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
hkothari authored and WenboZhao committed Sep 20, 2017
1 parent 2b5b8cd commit 38fa491
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -306,13 +306,20 @@ class CoarseCookSchedulerBackend(
s"[ -z $$KEEP_SPARK_LOCAL_TARS ] || rm -f $$(basename $uri)"
}

val logUrlCommand = Seq(
"export BASE_SPARK_LOG_URL=\"http://`hostname`:5051/files/download?path=$MESOS_SANDBOX\"",
"export SPARK_LOG_URL_STDERR=\"$BASE_SPARK_LOG_URL/stderr\"",
"export SPARK_LOG_URL_STDOUT=\"$BASE_SPARK_LOG_URL/stdout\""
)

val commandSeq =
debugCommand ++
envSettingCommand ++
uriFetchCommand ++
shippedTarballsCommand ++
remoteConfFetchCommand ++
keystorePullCommand.map(Seq(_)).getOrElse(Seq[String]()) ++
logUrlCommand ++
Seq("set", commandString) ++
cleanup

Expand Down

0 comments on commit 38fa491

Please sign in to comment.