Github user squito commented on a diff in the pull request:
https://github.com/apache/spark/pull/19698#discussion_r150626334
--- Diff: core/src/main/scala/org/apache/spark/ui/jobs/PoolPage.scala ---
@@ -17,50 +17,49 @@
package org.apache.spark.ui.jobs
+import java.util.NoSuchElementException
import javax.servlet.http.HttpServletRequest
import scala.xml.Node
-import org.apache.spark.scheduler.StageInfo
+import org.apache.spark.status.PoolData
+import org.apache.spark.status.api.v1._
import org.apache.spark.ui.{UIUtils, WebUIPage}
/** Page showing specific pool details */
private[ui] class PoolPage(parent: StagesTab) extends WebUIPage("pool") {
- private val sc = parent.sc
- private val listener = parent.progressListener
def render(request: HttpServletRequest): Seq[Node] = {
- listener.synchronized {
- // stripXSS is called first to remove suspicious characters used in
XSS attacks
- val poolName =
Option(UIUtils.stripXSS(request.getParameter("poolname"))).map { poolname =>
- UIUtils.decodeURLParameter(poolname)
- }.getOrElse {
- throw new IllegalArgumentException(s"Missing poolname parameter")
- }
+ // stripXSS is called first to remove suspicious characters used in
XSS attacks
+ val poolName =
Option(UIUtils.stripXSS(request.getParameter("poolname"))).map { poolname =>
+ UIUtils.decodeURLParameter(poolname)
+ }.getOrElse {
+ throw new IllegalArgumentException(s"Missing poolname parameter")
+ }
- val poolToActiveStages = listener.poolToActiveStages
- val activeStages = poolToActiveStages.get(poolName) match {
- case Some(s) => s.values.toSeq
- case None => Seq.empty[StageInfo]
- }
- val shouldShowActiveStages = activeStages.nonEmpty
- val activeStagesTable =
- new StageTableBase(request, activeStages, "", "activeStage",
parent.basePath, "stages/pool",
- parent.progressListener, parent.isFairScheduler,
parent.killEnabled,
- isFailedStage = false)
+ // For now, pool information is only accessible in live UIs
--- End diff --
weird that the PoolPage is even hooked up when there isn't a live UI
(but I think you have the right change here, I wouldn't change that
behavior as part of this)
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]