Github user markhamstra commented on a diff in the pull request:
    --- Diff: core/src/main/scala/org/apache/spark/ui/jobs/JobsTab.scala ---
    @@ -35,4 +37,20 @@ private[ui] class JobsTab(parent: SparkUI) extends 
SparkUITab(parent, "jobs") {
       attachPage(new AllJobsPage(this))
       attachPage(new JobPage(this))
    +  def handleKillRequest(request: HttpServletRequest): Unit = {
    +    if (killEnabled && 
parent.securityManager.checkModifyPermissions(request.getRemoteUser)) {
    +      val killFlag = 
    +      val jobId = Option(request.getParameter("id")).map(_.toInt)
    +      jobId.foreach { id =>
    +        if (killFlag && jobProgresslistener.activeJobs.contains(id)) {
    +          sc.foreach(_.cancelJob(id))
    +          // Do a quick pause here to give Spark time to kill the job so 
it shows up as
    +          // killed after the refresh. Note that this will block the 
serving thread so the
    +          // time should be limited in duration.
    +          Thread.sleep(100)
    --- End diff --
    Your doing the sleep here even if `sc` is `None`, but I wouldn't expect 
that that is even possible or that it is handled completely correctly elsewhere 
in the Web UI if it actually is possible, so this is likely fine in practice.

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 or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to