This is an automated email from the ASF dual-hosted git repository. vanzin pushed a commit to branch branch-2.4 in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-2.4 by this push: new 6d90298 [SPARK-25392][CORE][WEBUI] Prevent error page when accessing pools page from history server 6d90298 is described below commit 6d90298438e627187088a5d8c53d470646d051f4 Author: shahid <shahidk...@gmail.com> AuthorDate: Mon Dec 16 15:02:34 2019 -0800 [SPARK-25392][CORE][WEBUI] Prevent error page when accessing pools page from history server ### What changes were proposed in this pull request? ### Why are the changes needed? Currently from history server, we will not able to access the pool info, as we aren't writing pool information to the event log other than pool name. Already spark is hiding pool table when accessing from history server. But from the pool column in the stage table will redirect to the pools table, and that will throw error when accessing the pools page. To prevent error page, we need to hide the pool column also in the stage table ### Does this PR introduce any user-facing change? No ### How was this patch tested? Manual test Before change: ![Screenshot 2019-11-21 at 6 49 40 AM](https://user-images.githubusercontent.com/23054875/69293868-219b2280-0c30-11ea-9b9a-17140d024d3a.png) ![Screenshot 2019-11-21 at 6 48 51 AM](https://user-images.githubusercontent.com/23054875/69293834-147e3380-0c30-11ea-9dec-d5f67665486d.png) After change: ![Screenshot 2019-11-21 at 7 29 01 AM](https://user-images.githubusercontent.com/23054875/69293991-9cfcd400-0c30-11ea-98a0-7a6268a4e5ab.png) Closes #26616 from shahidki31/poolHistory. Authored-by: shahid <shahidk...@gmail.com> Signed-off-by: Marcelo Vanzin <van...@cloudera.com> (cherry picked from commit dd217e10fc0408831c2c658fc3f52d2917f1a6a2) Signed-off-by: Marcelo Vanzin <van...@cloudera.com> --- core/src/main/scala/org/apache/spark/ui/jobs/AllStagesPage.scala | 3 +-- core/src/main/scala/org/apache/spark/ui/jobs/JobsTab.scala | 2 ++ core/src/main/scala/org/apache/spark/ui/jobs/StagesTab.scala | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/core/src/main/scala/org/apache/spark/ui/jobs/AllStagesPage.scala b/core/src/main/scala/org/apache/spark/ui/jobs/AllStagesPage.scala index f672ce0..d8a93ad 100644 --- a/core/src/main/scala/org/apache/spark/ui/jobs/AllStagesPage.scala +++ b/core/src/main/scala/org/apache/spark/ui/jobs/AllStagesPage.scala @@ -30,7 +30,6 @@ import org.apache.spark.ui.{UIUtils, WebUIPage} private[ui] class AllStagesPage(parent: StagesTab) extends WebUIPage("") { private val sc = parent.sc private val subPath = "stages" - private def isFairScheduler = parent.isFairScheduler def render(request: HttpServletRequest): Seq[Node] = { // For now, pool information is only accessible in live UIs @@ -57,7 +56,7 @@ private[ui] class AllStagesPage(parent: StagesTab) extends WebUIPage("") { </ul> </div> - val poolsDescription = if (sc.isDefined && isFairScheduler) { + val poolsDescription = if (parent.isFairScheduler) { <span class="collapse-aggregated-poolTable collapse-table" onClick="collapseTable('collapse-aggregated-poolTable','aggregated-poolTable')"> <h4> diff --git a/core/src/main/scala/org/apache/spark/ui/jobs/JobsTab.scala b/core/src/main/scala/org/apache/spark/ui/jobs/JobsTab.scala index ff1b75e..102ec4d 100644 --- a/core/src/main/scala/org/apache/spark/ui/jobs/JobsTab.scala +++ b/core/src/main/scala/org/apache/spark/ui/jobs/JobsTab.scala @@ -33,7 +33,9 @@ private[ui] class JobsTab(parent: SparkUI, store: AppStatusStore) val sc = parent.sc val killEnabled = parent.killEnabled + // Show pool information for only live UI. def isFairScheduler: Boolean = { + sc.isDefined && store .environmentInfo() .sparkProperties diff --git a/core/src/main/scala/org/apache/spark/ui/jobs/StagesTab.scala b/core/src/main/scala/org/apache/spark/ui/jobs/StagesTab.scala index 10b0320..b7a8c56 100644 --- a/core/src/main/scala/org/apache/spark/ui/jobs/StagesTab.scala +++ b/core/src/main/scala/org/apache/spark/ui/jobs/StagesTab.scala @@ -36,7 +36,9 @@ private[ui] class StagesTab(val parent: SparkUI, val store: AppStatusStore) attachPage(new StagePage(this, store)) attachPage(new PoolPage(this)) + // Show pool information for only live UI. def isFairScheduler: Boolean = { + sc.isDefined && store .environmentInfo() .sparkProperties --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org