Skip to content
Snippets Groups Projects
Commit 9aa60329 authored by Andrew Or's avatar Andrew Or Committed by Patrick Wendell
Browse files

[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
parent 5603e4c4
No related branches found
No related tags found
No related merge requests found
......@@ -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 */
......
......@@ -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 */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment