Skip to content
Snippets Groups Projects
Commit 2bbf2353 authored by Cheng Lian's avatar Cheng Lian Committed by Patrick Wendell
Browse files

[SPARK-2705][CORE] Fixed stage description in stage info page

Stage description should be a `String`, but was changed to an `Option[String]` by mistake:

![stage-desc-small](https://cloud.githubusercontent.com/assets/230655/3655611/f6d0b0f6-117b-11e4-83ed-71000dcd5009.png)

Author: Cheng Lian <lian.cs.zju@gmail.com>

Closes #1524 from liancheng/fix-stage-desc and squashes the following commits:

3c69327 [Cheng Lian] Fixed stage description object type in Web UI stage table
parent 98570530
No related branches found
No related tags found
No related merge requests found
...@@ -119,14 +119,14 @@ private[ui] class StageTableBase( ...@@ -119,14 +119,14 @@ private[ui] class StageTableBase(
</div> </div>
} }
val stageDataOption = listener.stageIdToData.get(s.stageId) val stageDesc = for {
// Too many nested map/flatMaps with options are just annoying to read. Do this imperatively. stageData <- listener.stageIdToData.get(s.stageId)
if (stageDataOption.isDefined && stageDataOption.get.description.isDefined) { desc <- stageData.description
val desc = stageDataOption.get.description } yield {
<div><em>{desc}</em></div><div>{killLink} {nameLink} {details}</div> <div><em>{desc}</em></div>
} else {
<div>{killLink} {nameLink} {details}</div>
} }
<div>{stageDesc.getOrElse("")} {killLink} {nameLink} {details}</div>
} }
protected def stageRow(s: StageInfo): Seq[Node] = { protected def stageRow(s: StageInfo): Seq[Node] = {
......
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