-
Notifications
You must be signed in to change notification settings - Fork 28.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-15591] [WEBUI] Paginate Stage Table in Stages tab #13708
Changes from 5 commits
4255c09
4de6d68
246432d
7ccda86
4af0630
3a98c4d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,22 +38,20 @@ private[ui] class AllStagesPage(parent: StagesTab) extends WebUIPage("") { | |
val numCompletedStages = listener.numCompletedStages | ||
val failedStages = listener.failedStages.reverse.toSeq | ||
val numFailedStages = listener.numFailedStages | ||
val now = System.currentTimeMillis | ||
val subPath = "stages" | ||
|
||
val activeStagesTable = | ||
new StageTableBase(activeStages.sortBy(_.submissionTime).reverse, | ||
parent.basePath, parent.progressListener, isFairScheduler = parent.isFairScheduler, | ||
killEnabled = parent.killEnabled) | ||
new StageTableBase(request, activeStages, "activeStage", parent.basePath, subPath, | ||
parent.progressListener, parent.isFairScheduler, parent.killEnabled, false) | ||
val pendingStagesTable = | ||
new StageTableBase(pendingStages.sortBy(_.submissionTime).reverse, | ||
parent.basePath, parent.progressListener, isFairScheduler = parent.isFairScheduler, | ||
killEnabled = false) | ||
new StageTableBase(request, pendingStages, "pendingStage", parent.basePath, subPath, | ||
parent.progressListener, parent.isFairScheduler, false, false) | ||
val completedStagesTable = | ||
new StageTableBase(completedStages.sortBy(_.submissionTime).reverse, parent.basePath, | ||
parent.progressListener, isFairScheduler = parent.isFairScheduler, killEnabled = false) | ||
new StageTableBase(request, completedStages, "completedStage", parent.basePath, subPath, | ||
parent.progressListener, parent.isFairScheduler, false, false) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: add the parameter names for |
||
val failedStagesTable = | ||
new FailedStageTable(failedStages.sortBy(_.submissionTime).reverse, parent.basePath, | ||
parent.progressListener, isFairScheduler = parent.isFairScheduler) | ||
new StageTableBase(request, failedStages, "failedStage", parent.basePath, subPath, | ||
parent.progressListener, parent.isFairScheduler, false, true) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: add the parameter names for |
||
|
||
// For now, pool information is only accessible in live UIs | ||
val pools = sc.map(_.getAllPools).getOrElse(Seq.empty[Schedulable]) | ||
|
@@ -136,3 +134,4 @@ private[ui] class AllStagesPage(parent: StagesTab) extends WebUIPage("") { | |
} | ||
} | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -229,20 +229,20 @@ private[ui] class JobPage(parent: JobsTab) extends WebUIPage("job") { | |
} | ||
} | ||
|
||
val basePath = "jobs/job" | ||
|
||
val activeStagesTable = | ||
new StageTableBase(activeStages.sortBy(_.submissionTime).reverse, | ||
parent.basePath, parent.jobProgresslistener, isFairScheduler = parent.isFairScheduler, | ||
killEnabled = parent.killEnabled) | ||
new StageTableBase(request, activeStages, "activeStage", parent.basePath, | ||
basePath, parent.jobProgresslistener, parent.isFairScheduler, parent.killEnabled, false) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: add the parameter name for |
||
val pendingOrSkippedStagesTable = | ||
new StageTableBase(pendingOrSkippedStages.sortBy(_.stageId).reverse, | ||
parent.basePath, parent.jobProgresslistener, isFairScheduler = parent.isFairScheduler, | ||
killEnabled = false) | ||
new StageTableBase(request, pendingOrSkippedStages, "pendingStage", parent.basePath, | ||
basePath, parent.jobProgresslistener, parent.isFairScheduler, false, false) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: add the parameter names for |
||
val completedStagesTable = | ||
new StageTableBase(completedStages.sortBy(_.submissionTime).reverse, parent.basePath, | ||
parent.jobProgresslistener, isFairScheduler = parent.isFairScheduler, killEnabled = false) | ||
new StageTableBase(request, completedStages, "completedStage", parent.basePath, | ||
basePath, parent.jobProgresslistener, parent.isFairScheduler, false, false) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: add the parameter names for |
||
val failedStagesTable = | ||
new FailedStageTable(failedStages.sortBy(_.submissionTime).reverse, parent.basePath, | ||
parent.jobProgresslistener, isFairScheduler = parent.isFairScheduler) | ||
new StageTableBase(request, failedStages, "failedStage", parent.basePath, | ||
basePath, parent.jobProgresslistener, parent.isFairScheduler, false, true) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: add the parameter names for |
||
|
||
val shouldShowActiveStages = activeStages.nonEmpty | ||
val shouldShowPendingStages = !isComplete && pendingOrSkippedStages.nonEmpty | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,19 +42,21 @@ private[ui] class PoolPage(parent: StagesTab) extends WebUIPage("pool") { | |
case Some(s) => s.values.toSeq | ||
case None => Seq[StageInfo]() | ||
} | ||
val activeStagesTable = new StageTableBase(activeStages.sortBy(_.submissionTime).reverse, | ||
parent.basePath, parent.progressListener, isFairScheduler = parent.isFairScheduler, | ||
killEnabled = parent.killEnabled) | ||
val shouldShowActiveStages = activeStages.nonEmpty | ||
val activeStagesTable = | ||
new StageTableBase(request, activeStages, "activeStage", parent.basePath, "stages/pool", | ||
parent.progressListener, parent.isFairScheduler, parent.killEnabled, false) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: add the parameter name for |
||
|
||
// For now, pool information is only accessible in live UIs | ||
val pools = sc.map(_.getPoolForName(poolName).getOrElse { | ||
throw new IllegalArgumentException(s"Unknown poolname: $poolName") | ||
}).toSeq | ||
val poolTable = new PoolTable(pools, parent) | ||
|
||
val content = | ||
<h4>Summary </h4> ++ poolTable.toNodeSeq ++ | ||
<h4>{activeStages.size} Active Stages</h4> ++ activeStagesTable.toNodeSeq | ||
var content = <h4>Summary </h4> ++ poolTable.toNodeSeq | ||
if (shouldShowActiveStages) { | ||
content ++= <h4>{activeStages.size} Active Stages</h4> ++ activeStagesTable.toNodeSeq | ||
} | ||
|
||
UIUtils.headerSparkPage("Fair Scheduler Pool: " + poolName, content, parent) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: could you add the parameter names for
false
s back to improve the readability?