Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/421#discussion_r11779317
--- Diff: core/src/main/scala/org/apache/spark/ui/jobs/StageTable.scala ---
@@ -27,33 +27,37 @@ import org.apache.spark.ui.UIUtils
import org.apache.spark.util.Utils
/** Page showing list of all ongoing and recently finished stages */
-private[ui] class StageTable(
+private[ui] class StageTableBase(
stages: Seq[StageInfo],
parent: JobProgressTab,
killEnabled: Boolean = false) {
private val basePath = parent.basePath
private val listener = parent.listener
- private lazy val isFairScheduler = parent.isFairScheduler
+ protected lazy val isFairScheduler = parent.isFairScheduler
+
+ protected lazy val columns = {
+ <th>Stage Id</th>
+ if (isFairScheduler) {<th>Pool Name</th>} else {}
+ <th>Description</th>
+ <th>Submitted</th>
+ <th>Duration</th>
+ <th>Tasks: Succeeded/Total</th>
+ <th>Shuffle Read</th>
+ <th>Shuffle Write</th>
+ }
def toNodeSeq: Seq[Node] = {
listener.synchronized {
- stageTable(stageRow, stages)
+ stageTable(renderStageRow, stages)
}
}
/** Special table that merges two header cells. */
- private def stageTable[T](makeRow: T => Seq[Node], rows: Seq[T]):
Seq[Node] = {
+ protected def stageTable[T](makeRow: T => Seq[Node], rows: Seq[T]):
Seq[Node] = {
<table class="table table-bordered table-striped table-condensed
sortable">
<thead>
- <th>Stage Id</th>
- {if (isFairScheduler) {<th>Pool Name</th>} else {}}
- <th>Description</th>
- <th>Submitted</th>
- <th>Duration</th>
- <th>Tasks: Succeeded/Total</th>
- <th>Shuffle Read</th>
- <th>Shuffle Write</th>
+ {columns}
</thead>
--- End diff --
another small nit: let's do `<thead>{columns}</thead>` in 1 line. It's more
concise
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---