Skip to content

Commit ca5d320

Browse files
author
Marcelo Vanzin
committed
Remove code that deals with unfinished apps.
The HS only reads logs from finished apps, so remove the code that checked whether the app was actually finished.
1 parent 6e2432f commit ca5d320

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

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

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,20 +67,17 @@ private[spark] class HistoryPage(parent: HistoryServer) extends WebUIPage("") {
6767
"Last Updated")
6868

6969
private def appRow(info: ApplicationHistoryInfo): Seq[Node] = {
70-
val appName = if (info.started) info.name else info.id
7170
val uiAddress = "/history/" + info.id
72-
val startTime = if (info.started) UIUtils.formatDate(info.startTime) else "Not started"
73-
val endTime = if (info.completed) UIUtils.formatDate(info.endTime) else "Not completed"
74-
val difference = if (info.started && info.completed) info.endTime - info.startTime else -1L
75-
val duration = if (difference > 0) UIUtils.formatDuration(difference) else "---"
76-
val sparkUser = if (info.started) info.sparkUser else "Unknown user"
71+
val startTime = UIUtils.formatDate(info.startTime)
72+
val endTime = UIUtils.formatDate(info.endTime)
73+
val duration = UIUtils.formatDuration(info.endTime - info.startTime)
7774
val lastUpdated = UIUtils.formatDate(info.lastUpdated)
7875
<tr>
79-
<td><a href={uiAddress}>{appName}</a></td>
76+
<td><a href={uiAddress}>{info.name}</a></td>
8077
<td>{startTime}</td>
8178
<td>{endTime}</td>
8279
<td>{duration}</td>
83-
<td>{sparkUser}</td>
80+
<td>{info.sparkUser}</td>
8481
<td>{lastUpdated}</td>
8582
</tr>
8683
}

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,4 @@ private[spark] case class ApplicationHistoryInfo(
307307
sparkUser: String,
308308
viewAcls: String,
309309
ui: SparkUI) {
310-
def started = startTime != -1
311-
def completed = endTime != -1
312310
}

0 commit comments

Comments
 (0)