cloud-fan commented on code in PR #47374:
URL: https://github.com/apache/spark/pull/47374#discussion_r1689166784


##########
core/src/main/scala/org/apache/spark/scheduler/JobWaiter.scala:
##########
@@ -44,15 +44,18 @@ private[spark] class JobWaiter[T](
 
   def completionFuture: Future[Unit] = jobPromise.future
 
+
   /**
-   * Sends a signal to the DAGScheduler to cancel the job. The cancellation 
itself is handled
-   * asynchronously. After the low level scheduler cancels all the tasks 
belonging to this job, it
-   * will fail this job with a SparkException.
+   * Sends a signal to the DAGScheduler to cancel the job with an optional 
reason. The
+   * cancellation itself is handled asynchronously. After the low level 
scheduler cancels
+   * all the tasks belonging to this job, it will fail this job with a 
SparkException.
    */
-  def cancel(): Unit = {
-    dagScheduler.cancelJob(jobId, None)
+  def cancel(reason: Option[String]): Unit = {
+    dagScheduler.cancelJob(jobId, reason)
   }
 
+  def cancel(): Unit = cancel(None)

Review Comment:
   ditto, add back its API doc



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to