spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hvanhovell <...@git.apache.org>
Subject [GitHub] spark pull request #16887: [SPARK-19549] Allow providing reason for stage/jo...
Date Fri, 10 Feb 2017 16:41:58 GMT
Github user hvanhovell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16887#discussion_r100573520
  
    --- Diff: core/src/main/scala/org/apache/spark/SparkContext.scala ---
    @@ -2207,10 +2207,32 @@ class SparkContext(config: SparkConf) extends Logging {
        * Cancel a given job if it's scheduled or running.
        *
        * @param jobId the job ID to cancel
    +   * @param reason optional reason for cancellation
        * @note Throws `InterruptedException` if the cancel message cannot be sent
        */
    -  def cancelJob(jobId: Int) {
    -    dagScheduler.cancelJob(jobId)
    +  def cancelJob(jobId: Int, reason: String): Unit = {
    +    dagScheduler.cancelJob(jobId, Some(reason))
    --- End diff --
    
    Please use `Option(reason)`, `Some(reason)` will happily wrap a null.


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

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


Mime
View raw message