diff options
author | wangda.tan <wheeleast@gmail.com> | 2013-12-23 15:03:45 +0800 |
---|---|---|
committer | wangda.tan <wheeleast@gmail.com> | 2013-12-23 15:03:45 +0800 |
commit | 2f689ba97b437092bf52063cface12aa9ee09bf3 (patch) | |
tree | 65157aee284f6e5c64ea7e7565a2d2fe328fe4b1 /core/src/main/scala/org/apache | |
parent | c979eecdf6a11462595aba9d5b8fc942682cf85d (diff) | |
download | spark-2f689ba97b437092bf52063cface12aa9ee09bf3.tar.gz spark-2f689ba97b437092bf52063cface12aa9ee09bf3.tar.bz2 spark-2f689ba97b437092bf52063cface12aa9ee09bf3.zip |
SPARK-968, added executor address showing in aggregated metrics by executors table
Diffstat (limited to 'core/src/main/scala/org/apache')
-rw-r--r-- | core/src/main/scala/org/apache/spark/ui/jobs/ExecutorTable.scala | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/core/src/main/scala/org/apache/spark/ui/jobs/ExecutorTable.scala b/core/src/main/scala/org/apache/spark/ui/jobs/ExecutorTable.scala index 0e9dd4a8c7..0dd876480a 100644 --- a/core/src/main/scala/org/apache/spark/ui/jobs/ExecutorTable.scala +++ b/core/src/main/scala/org/apache/spark/ui/jobs/ExecutorTable.scala @@ -21,6 +21,7 @@ import scala.xml.Node import org.apache.spark.scheduler.SchedulingMode import org.apache.spark.util.Utils +import scala.collection.mutable /** Page showing executor summary */ private[spark] class ExecutorTable(val parent: JobProgressUI, val stageId: Int) { @@ -40,6 +41,7 @@ private[spark] class ExecutorTable(val parent: JobProgressUI, val stageId: Int) <table class="table table-bordered table-striped table-condensed sortable"> <thead> <th>Executor ID</th> + <th>Address</th> <th>Task Time</th> <th>Total Tasks</th> <th>Failed Tasks</th> @@ -54,6 +56,16 @@ private[spark] class ExecutorTable(val parent: JobProgressUI, val stageId: Int) } private def createExecutorTable() : Seq[Node] = { + // make a executor-id -> address map + val executorIdToAddress = mutable.HashMap[String, String]() + val storageStatusList = parent.sc.getExecutorStorageStatus + for (statusId <- 0 until storageStatusList.size) { + val blockManagerId = parent.sc.getExecutorStorageStatus(statusId).blockManagerId + val address = blockManagerId.hostPort + val executorId = blockManagerId.executorId + executorIdToAddress.put(executorId, address) + } + val executorIdToSummary = listener.stageIdToExecutorSummaries.get(stageId) executorIdToSummary match { case Some(x) => { @@ -61,6 +73,7 @@ private[spark] class ExecutorTable(val parent: JobProgressUI, val stageId: Int) case (k,v) => { <tr> <td>{k}</td> + <td>{executorIdToAddress.getOrElse(k, "CANNOT FIND ADDRESS")}</td> <td>{parent.formatDuration(v.taskTime)}</td> <td>{v.failedTasks + v.succeededTasks}</td> <td>{v.failedTasks}</td> |