diff --git a/core/src/main/resources/org/apache/spark/ui/static/webui.js b/core/src/main/resources/org/apache/spark/ui/static/webui.js index f01c567ba58a..12c056af9a51 100644 --- a/core/src/main/resources/org/apache/spark/ui/static/webui.js +++ b/core/src/main/resources/org/apache/spark/ui/static/webui.js @@ -83,4 +83,7 @@ $(function() { collapseTablePageLoad('collapse-aggregated-rdds','aggregated-rdds'); collapseTablePageLoad('collapse-aggregated-activeBatches','aggregated-activeBatches'); collapseTablePageLoad('collapse-aggregated-completedBatches','aggregated-completedBatches'); + collapseTablePageLoad('collapse-aggregated-runningExecutions','runningExecutions'); + collapseTablePageLoad('collapse-aggregated-completedExecutions','completedExecutions'); + collapseTablePageLoad('collapse-aggregated-failedExecutions','failedExecutions'); }); \ No newline at end of file diff --git a/sql/core/src/main/scala/org/apache/spark/sql/execution/ui/AllExecutionsPage.scala b/sql/core/src/main/scala/org/apache/spark/sql/execution/ui/AllExecutionsPage.scala index bf46bc4cf904..4330161fa08c 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/execution/ui/AllExecutionsPage.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/execution/ui/AllExecutionsPage.scala @@ -55,24 +55,57 @@ private[ui] class AllExecutionsPage(parent: SQLTab) extends WebUIPage("") with L val _content = mutable.ListBuffer[Node]() if (running.nonEmpty) { + val runningPageTable = new RunningExecutionTable( + parent, currentTime, running.sortBy(_.submissionTime).reverse).toNodeSeq(request) + _content ++= - new RunningExecutionTable( - parent, s"Running Queries (${running.size})", currentTime, - running.sortBy(_.submissionTime).reverse).toNodeSeq(request) + +

+ + Running Queries ({running.size}) +

+
++ +
+ {runningPageTable} +
} if (completed.nonEmpty) { + val completedPageTable = new CompletedExecutionTable( + parent, currentTime, completed.sortBy(_.submissionTime).reverse).toNodeSeq(request) + _content ++= - new CompletedExecutionTable( - parent, s"Completed Queries (${completed.size})", currentTime, - completed.sortBy(_.submissionTime).reverse).toNodeSeq(request) + +

+ + Completed Queries ({completed.size}) +

+
++ +
+ {completedPageTable} +
} if (failed.nonEmpty) { + val failedPageTable = new FailedExecutionTable( + parent, currentTime, failed.sortBy(_.submissionTime).reverse).toNodeSeq(request) + _content ++= - new FailedExecutionTable( - parent, s"Failed Queries (${failed.size})", currentTime, - failed.sortBy(_.submissionTime).reverse).toNodeSeq(request) + +

+ + Failed Queries ({failed.size}) +

+
++ +
+ {failedPageTable} +
} _content } @@ -118,7 +151,6 @@ private[ui] class AllExecutionsPage(parent: SQLTab) extends WebUIPage("") with L private[ui] abstract class ExecutionTable( parent: SQLTab, tableId: String, - tableName: String, currentTime: Long, executionUIDatas: Seq[SQLExecutionUIData], showRunningJobs: Boolean, @@ -206,11 +238,8 @@ private[ui] abstract class ExecutionTable( } def toNodeSeq(request: HttpServletRequest): Seq[Node] = { -
-

{tableName}

- {UIUtils.listingTable[SQLExecutionUIData]( - header, row(request, currentTime, _), executionUIDatas, id = Some(tableId))} -
+ UIUtils.listingTable[SQLExecutionUIData]( + header, row(request, currentTime, _), executionUIDatas, id = Some(tableId)) } private def jobURL(request: HttpServletRequest, jobId: Long): String = @@ -223,13 +252,11 @@ private[ui] abstract class ExecutionTable( private[ui] class RunningExecutionTable( parent: SQLTab, - tableName: String, currentTime: Long, executionUIDatas: Seq[SQLExecutionUIData]) extends ExecutionTable( parent, "running-execution-table", - tableName, currentTime, executionUIDatas, showRunningJobs = true, @@ -242,13 +269,11 @@ private[ui] class RunningExecutionTable( private[ui] class CompletedExecutionTable( parent: SQLTab, - tableName: String, currentTime: Long, executionUIDatas: Seq[SQLExecutionUIData]) extends ExecutionTable( parent, "completed-execution-table", - tableName, currentTime, executionUIDatas, showRunningJobs = false, @@ -260,13 +285,11 @@ private[ui] class CompletedExecutionTable( private[ui] class FailedExecutionTable( parent: SQLTab, - tableName: String, currentTime: Long, executionUIDatas: Seq[SQLExecutionUIData]) extends ExecutionTable( parent, "failed-execution-table", - tableName, currentTime, executionUIDatas, showRunningJobs = false,