Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3356F200C17 for ; Fri, 10 Feb 2017 17:42:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 31EFC160B5C; Fri, 10 Feb 2017 16:42:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A0E1C160B4E for ; Fri, 10 Feb 2017 17:41:59 +0100 (CET) Received: (qmail 13696 invoked by uid 500); 10 Feb 2017 16:41:58 -0000 Mailing-List: contact reviews-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@spark.apache.org Received: (qmail 13681 invoked by uid 99); 10 Feb 2017 16:41:58 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Feb 2017 16:41:58 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 619EDDFBDB; Fri, 10 Feb 2017 16:41:58 +0000 (UTC) From: hvanhovell To: reviews@spark.apache.org Reply-To: reviews@spark.apache.org References: In-Reply-To: Subject: [GitHub] spark pull request #16887: [SPARK-19549] Allow providing reason for stage/jo... Content-Type: text/plain Message-Id: <20170210164158.619EDDFBDB@git1-us-west.apache.org> Date: Fri, 10 Feb 2017 16:41:58 +0000 (UTC) archived-at: Fri, 10 Feb 2017 16:42:00 -0000 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