Github user kayousterhout commented on a diff in the pull request:

    https://github.com/apache/spark/pull/3009#discussion_r20174958
  
    --- Diff: core/src/main/scala/org/apache/spark/ui/SparkUI.scala ---
    @@ -45,20 +45,23 @@ private[spark] class SparkUI private (
     
       /** Initialize all components of the server. */
       def initialize() {
    -    val jobProgressTab = new JobProgressTab(this)
    -    attachTab(jobProgressTab)
    +    attachTab(new JobsTab(this))
    +    val stagesTab = new StagesTab(this)
    +    attachTab(stagesTab)
         attachTab(new StorageTab(this))
         attachTab(new EnvironmentTab(this))
         attachTab(new ExecutorsTab(this))
         attachHandler(createStaticHandler(SparkUI.STATIC_RESOURCE_DIR, 
"/static"))
    -    attachHandler(createRedirectHandler("/", "/stages", basePath = 
basePath))
    +    attachHandler(createRedirectHandler("/", "/jobs", basePath = basePath))
         attachHandler(
    -      createRedirectHandler("/stages/stage/kill", "/stages", 
jobProgressTab.handleKillRequest))
    +      createRedirectHandler("/stages/stage/kill", "/stages", 
stagesTab.handleKillRequest))
         // If the UI is live, then serve
         sc.foreach { 
_.env.metricsSystem.getServletHandlers.foreach(attachHandler) }
       }
       initialize()
     
    +  val killEnabled = sc.map(_.conf.getBoolean("spark.ui.killEnabled", 
true)).getOrElse(false)
    --- End diff --
    
    I think you need to move this to before the initialize() call -- as is, 
kill is always disabled, because killEnabled is false when initialize is 
called, so StagesTab will be initialized with killEnabled set to false (I 
noticed this when I was playing around with this, because the kill button was 
nowhere to be found).


---
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.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to