Skip to content

Commit 647df2d

Browse files
Willymontazuser
authored andcommitted
SPARK-25973 Spark History Main page performance improvement (apache#81)
SPARK-25973 Spark History Main page performance improvement
1 parent 6d0e03a commit 647df2d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/src/main/scala/org/apache/spark/deploy/history/HistoryPage.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ private[history] class HistoryPage(parent: HistoryServer) extends WebUIPage("")
3131
val requestedIncomplete =
3232
Option(UIUtils.stripXSS(request.getParameter("showIncomplete"))).getOrElse("false").toBoolean
3333

34-
val allAppsSize = parent.getApplicationList()
35-
.count(isApplicationCompleted(_) != requestedIncomplete)
34+
val displayApplications = parent.getApplicationList()
35+
.exists(isApplicationCompleted(_) != requestedIncomplete)
3636
val eventLogsUnderProcessCount = parent.getEventLogsUnderProcess()
3737
val lastUpdatedTime = parent.getLastUpdatedTime()
3838
val providerConfig = parent.getProviderConfig()
@@ -63,7 +63,7 @@ private[history] class HistoryPage(parent: HistoryServer) extends WebUIPage("")
6363
}
6464

6565
{
66-
if (allAppsSize > 0) {
66+
if (displayApplications) {
6767
<script src={UIUtils.prependBaseUri("/static/dataTables.rowsGroup.js")}></script> ++
6868
<div id="history-summary" class="row-fluid"></div> ++
6969
<script src={UIUtils.prependBaseUri("/static/historypage.js")}></script> ++

0 commit comments

Comments
 (0)