Skip to content

Commit

Permalink
Fix the code style
Browse files Browse the repository at this point in the history
  • Loading branch information
zsxwing committed May 7, 2015
1 parent 718765e commit aca0ba6
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,14 +200,13 @@ private[ui] class BatchPage(parent: StreamingTab) extends WebUIPage("batch") {
private def generateOutputOpDescription(sparkJobs: Seq[SparkJobIdWithUIData]): Seq[Node] = {
val lastStageInfo =
sparkJobs.flatMap(_.jobUIData).headOption. // Get the first JobUIData
// Get the latest Stage info
flatMap { sparkJob =>
if (sparkJob.stageIds.isEmpty) {
None
} else {
sparkListener.stageIdToInfo.get(sparkJob.stageIds.max)
flatMap { sparkJob => // For the first job, get the latest Stage info
if (sparkJob.stageIds.isEmpty) {
None
} else {
sparkListener.stageIdToInfo.get(sparkJob.stageIds.max)
}
}
}
val lastStageData = lastStageInfo.flatMap { s =>
sparkListener.stageIdToData.get((s.stageId, s.attemptId))
}
Expand Down

0 comments on commit aca0ba6

Please sign in to comment.