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

    https://github.com/apache/spark/pull/17166#discussion_r104778912
  
    --- Diff: core/src/main/scala/org/apache/spark/SparkContext.scala ---
    @@ -2250,6 +2250,25 @@ class SparkContext(config: SparkConf) extends 
Logging {
       }
     
       /**
    +   * Kill a given task. It will be retried.
    +   *
    +   * @param taskId the task ID to kill
    +   */
    +  def killTask(taskId: Long): Unit = {
    +    killTask(taskId, "cancelled")
    +  }
    +
    +  /**
    +   * Kill a given task. It will be retried.
    +   *
    +   * @param taskId the task ID to kill
    +   * @param reason the reason for killing the task, which should be a 
short string
    +   */
    +  def killTask(taskId: Long, reason: String): Unit = {
    --- End diff --
    
    Given Mridul's points maybe killTaskAttempt is a better name?  IMO 
specifying "attempt" in the name makes it sound less permanent than killTask 
(which to me sounds like it won't be retried)


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to