Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions core/src/main/resources/org/apache/spark/ui/static/webui.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
});
Original file line number Diff line number Diff line change
Expand Up @@ -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)
<span id="running" class="collapse-aggregated-runningExecutions collapse-table"
onClick="collapseTable('collapse-aggregated-runningExecutions',
'aggregated-runningExecutions')">
<h4>
<span class="collapse-table-arrow arrow-open"></span>
<a>Running Queries ({running.size})</a>
</h4>
</span> ++
<div class="aggregated-runningExecutions collapsible-table">
{runningPageTable}
</div>
}

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)
<span id="completed" class="collapse-aggregated-completedExecutions collapse-table"
onClick="collapseTable('collapse-aggregated-completedExecutions',
'aggregated-completedExecutions')">
<h4>
<span class="collapse-table-arrow arrow-open"></span>
<a>Completed Queries ({completed.size})</a>
</h4>
</span> ++
<div class="aggregated-completedExecutions collapsible-table">
{completedPageTable}
</div>
}

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)
<span id="failed" class="collapse-aggregated-failedExecutions collapse-table"
onClick="collapseTable('collapse-aggregated-failedExecutions',
'aggregated-failedExecutions')">
<h4>
<span class="collapse-table-arrow arrow-open"></span>
<a>Failed Queries ({failed.size})</a>
</h4>
</span> ++
<div class="aggregated-failedExecutions collapsible-table">
{failedPageTable}
</div>
}
_content
}
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -206,11 +238,8 @@ private[ui] abstract class ExecutionTable(
}

def toNodeSeq(request: HttpServletRequest): Seq[Node] = {
<div>
<h4>{tableName}</h4>
{UIUtils.listingTable[SQLExecutionUIData](
header, row(request, currentTime, _), executionUIDatas, id = Some(tableId))}
</div>
UIUtils.listingTable[SQLExecutionUIData](
header, row(request, currentTime, _), executionUIDatas, id = Some(tableId))
}

private def jobURL(request: HttpServletRequest, jobId: Long): String =
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down