spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pwend...@apache.org
Subject git commit: [SPARK-2258 / 2266] Fix a few worker UI bugs
Date Wed, 25 Jun 2014 19:23:13 GMT
Repository: spark
Updated Branches:
  refs/heads/master 5603e4c47 -> 9aa603296


[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


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/9aa60329
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/9aa60329
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/9aa60329

Branch: refs/heads/master
Commit: 9aa603296c285e1acf4bde64583f203008ba3e91
Parents: 5603e4c
Author: Andrew Or <andrewor14@gmail.com>
Authored: Wed Jun 25 12:23:08 2014 -0700
Committer: Patrick Wendell <pwendell@gmail.com>
Committed: Wed Jun 25 12:23:08 2014 -0700

----------------------------------------------------------------------
 .../scala/org/apache/spark/deploy/worker/ExecutorRunner.scala   | 5 +++--
 .../main/scala/org/apache/spark/deploy/worker/ui/LogPage.scala  | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/9aa60329/core/src/main/scala/org/apache/spark/deploy/worker/ExecutorRunner.scala
----------------------------------------------------------------------
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 6433aac..467317d 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 */

http://git-wip-us.apache.org/repos/asf/spark/blob/9aa60329/core/src/main/scala/org/apache/spark/deploy/worker/ui/LogPage.scala
----------------------------------------------------------------------
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 6a5ffb1..b389cb5 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 */


Mime
View raw message