Skip to content
Snippets Groups Projects
Commit b60839e5 authored by BlackNiuza's avatar BlackNiuza Committed by shiyun.wxm
Browse files

correct number of tasks in ExecutorsUI

parent 96e0fb46
No related branches found
No related tags found
No related merge requests found
...@@ -100,15 +100,16 @@ private[spark] class ExecutorsUI(val sc: SparkContext) { ...@@ -100,15 +100,16 @@ private[spark] class ExecutorsUI(val sc: SparkContext) {
} }
def getExecInfo(a: Int): Seq[String] = { def getExecInfo(a: Int): Seq[String] = {
val execId = sc.getExecutorStorageStatus(a).blockManagerId.executorId val status = sc.getExecutorStorageStatus(a)
val hostPort = sc.getExecutorStorageStatus(a).blockManagerId.hostPort val execId = status.blockManagerId.executorId
val rddBlocks = sc.getExecutorStorageStatus(a).blocks.size.toString val hostPort = status.blockManagerId.hostPort
val memUsed = sc.getExecutorStorageStatus(a).memUsed().toString val rddBlocks = status.blocks.size.toString
val maxMem = sc.getExecutorStorageStatus(a).maxMem.toString val memUsed = status.memUsed().toString
val diskUsed = sc.getExecutorStorageStatus(a).diskUsed().toString val maxMem = status.maxMem.toString
val activeTasks = listener.executorToTasksActive.get(a.toString).map(l => l.size).getOrElse(0) val diskUsed = status.diskUsed().toString
val failedTasks = listener.executorToTasksFailed.getOrElse(a.toString, 0) val activeTasks = listener.executorToTasksActive.getOrElse(execId, Seq[Long]()).size
val completedTasks = listener.executorToTasksComplete.getOrElse(a.toString, 0) val failedTasks = listener.executorToTasksFailed.getOrElse(execId, 0)
val completedTasks = listener.executorToTasksComplete.getOrElse(execId, 0)
val totalTasks = activeTasks + failedTasks + completedTasks val totalTasks = activeTasks + failedTasks + completedTasks
Seq( Seq(
......
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