Skip to content

Commit

Permalink
[SPARK-2705][CORE] Fixed stage description in stage info page
Browse files Browse the repository at this point in the history
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 <[email protected]>

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

3c69327 [Cheng Lian] Fixed stage description object type in Web UI stage table
  • Loading branch information
liancheng authored and pwendell committed Jul 27, 2014
1 parent 9857053 commit 2bbf235
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions core/src/main/scala/org/apache/spark/ui/jobs/StageTable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,14 @@ private[ui] class StageTableBase(
</div>
}

val stageDataOption = listener.stageIdToData.get(s.stageId)
// Too many nested map/flatMaps with options are just annoying to read. Do this imperatively.
if (stageDataOption.isDefined && stageDataOption.get.description.isDefined) {
val desc = stageDataOption.get.description
<div><em>{desc}</em></div><div>{killLink} {nameLink} {details}</div>
} else {
<div>{killLink} {nameLink} {details}</div>
val stageDesc = for {
stageData <- listener.stageIdToData.get(s.stageId)
desc <- stageData.description
} yield {
<div><em>{desc}</em></div>
}

<div>{stageDesc.getOrElse("")} {killLink} {nameLink} {details}</div>
}

protected def stageRow(s: StageInfo): Seq[Node] = {
Expand Down

0 comments on commit 2bbf235

Please sign in to comment.