Skip to content
Snippets Groups Projects
Commit 8a4edecc authored by zsxwing's avatar zsxwing Committed by Andrew Or
Browse files

[SPARK-7534] [CORE] [WEBUI] Fix the Stage table when a stage is missing

Just improved the Stage table when a stage is missing.

Before:

![screen shot 2015-05-11 at 10 11 51 am](https://cloud.githubusercontent.com/assets/1000778/7570842/2ba37380-f7c8-11e4-9b5f-cf1a6264b2a4.png)

After:

![screen shot 2015-05-11 at 10 26 09 am](https://cloud.githubusercontent.com/assets/1000778/7570848/33703152-f7c8-11e4-81a8-d53dd72d7b8d.png)

Author: zsxwing <zsxwing@gmail.com>

Closes #6061 from zsxwing/SPARK-7534 and squashes the following commits:

09fe862 [zsxwing] Leave it blank rather than '-'
6299197 [zsxwing] Fix the Stage table when a stage is missing
parent 640f63b9
No related branches found
No related tags found
No related merge requests found
...@@ -121,10 +121,23 @@ private[ui] class StageTableBase( ...@@ -121,10 +121,23 @@ private[ui] class StageTableBase(
<div>{stageDesc.getOrElse("")} {killLink} {nameLink} {details}</div> <div>{stageDesc.getOrElse("")} {killLink} {nameLink} {details}</div>
} }
protected def missingStageRow(stageId: Int): Seq[Node] = {
<td>{stageId}</td> ++
{if (isFairScheduler) {<td>-</td>} else Seq.empty} ++
<td>No data available for this stage</td> ++ // Description
<td></td> ++ // Submitted
<td></td> ++ // Duration
<td></td> ++ // Tasks: Succeeded/Total
<td></td> ++ // Input
<td></td> ++ // Output
<td></td> ++ // Shuffle Read
<td></td> // Shuffle Write
}
protected def stageRow(s: StageInfo): Seq[Node] = { protected def stageRow(s: StageInfo): Seq[Node] = {
val stageDataOption = listener.stageIdToData.get((s.stageId, s.attemptId)) val stageDataOption = listener.stageIdToData.get((s.stageId, s.attemptId))
if (stageDataOption.isEmpty) { if (stageDataOption.isEmpty) {
return <td>{s.stageId}</td><td>No data available for this stage</td> return missingStageRow(s.stageId)
} }
val stageData = stageDataOption.get val stageData = stageDataOption.get
......
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