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

    https://github.com/apache/spark/pull/15441#discussion_r84582699
  
    --- 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 = 
Option(request.getParameter("terminate")).getOrElse("false").toBoolean
    +      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 --
    
    I just did some looking into the git history and thats left over from when 
there wasn't a separate `/kill` endpoint, so I'll remove that logic in my next 
commit


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