aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorAndrew Or <andrewor14@gmail.com>2014-06-25 12:23:08 -0700
committerPatrick Wendell <pwendell@gmail.com>2014-06-25 12:23:08 -0700
commit9aa603296c285e1acf4bde64583f203008ba3e91 (patch)
treec55350f87e19577efed7772ada25acc0bfb004f4 /core
parent5603e4c47f1dc1b87336f57ed4d6bd9e88f5abcc (diff)
downloadspark-9aa603296c285e1acf4bde64583f203008ba3e91.tar.gz
spark-9aa603296c285e1acf4bde64583f203008ba3e91.tar.bz2
spark-9aa603296c285e1acf4bde64583f203008ba3e91.zip
[SPARK-2258 / 2266] Fix a few worker UI bugs
**SPARK-2258.** Worker UI displays zombie processes if the executor throws an exception before a process is launched. This is because we only inform the Worker of the change if the process is already launched, which in this case it isn't. **SPARK-2266.** We expose "Some(app-id)" on the log page. This is fairly minor. Author: Andrew Or <andrewor14@gmail.com> Closes #1213 from andrewor14/fix-worker-ui and squashes the following commits: c1223fe [Andrew Or] Fix worker UI bugs
Diffstat (limited to 'core')
-rw-r--r--core/src/main/scala/org/apache/spark/deploy/worker/ExecutorRunner.scala5
-rw-r--r--core/src/main/scala/org/apache/spark/deploy/worker/ui/LogPage.scala2
2 files changed, 4 insertions, 3 deletions
diff --git a/core/src/main/scala/org/apache/spark/deploy/worker/ExecutorRunner.scala b/core/src/main/scala/org/apache/spark/deploy/worker/ExecutorRunner.scala
index 6433aac1c2..467317dd9b 100644
--- a/core/src/main/scala/org/apache/spark/deploy/worker/ExecutorRunner.scala
+++ b/core/src/main/scala/org/apache/spark/deploy/worker/ExecutorRunner.scala
@@ -77,6 +77,7 @@ private[spark] class ExecutorRunner(
* @param message the exception message which caused the executor's death
*/
private def killProcess(message: Option[String]) {
+ var exitCode: Option[Int] = None
if (process != null) {
logInfo("Killing process!")
process.destroy()
@@ -87,9 +88,9 @@ private[spark] class ExecutorRunner(
if (stderrAppender != null) {
stderrAppender.stop()
}
- val exitCode = process.waitFor()
- worker ! ExecutorStateChanged(appId, execId, state, message, Some(exitCode))
+ exitCode = Some(process.waitFor())
}
+ worker ! ExecutorStateChanged(appId, execId, state, message, exitCode)
}
/** Stop this executor runner, including killing the process it launched */
diff --git a/core/src/main/scala/org/apache/spark/deploy/worker/ui/LogPage.scala b/core/src/main/scala/org/apache/spark/deploy/worker/ui/LogPage.scala
index 6a5ffb1b71..b389cb546d 100644
--- a/core/src/main/scala/org/apache/spark/deploy/worker/ui/LogPage.scala
+++ b/core/src/main/scala/org/apache/spark/deploy/worker/ui/LogPage.scala
@@ -120,7 +120,7 @@ private[spark] class LogPage(parent: WorkerWebUI) extends WebUIPage("logPage") w
</div>
</body>
</html>
- UIUtils.basicSparkPage(content, logType + " log page for " + appId)
+ UIUtils.basicSparkPage(content, logType + " log page for " + appId.getOrElse("unknown app"))
}
/** Get the part of the log files given the offset and desired length of bytes */