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

    https://github.com/apache/spark/pull/9264#discussion_r44568751
  
    --- Diff: core/src/main/scala/org/apache/spark/FutureAction.scala ---
    @@ -229,28 +183,15 @@ class ComplexFutureAction[T] extends FutureAction[T] {
           processPartition: Iterator[T] => U,
           partitions: Seq[Int],
           resultHandler: (Int, U) => Unit,
    -      resultFunc: => R) {
    +      resultFunc: => R) : FutureAction[R] = synchronized {
         // If the action hasn't been cancelled yet, submit the job. The check 
and the submitJob
         // command need to be in an atomic block.
    -    val job = this.synchronized {
    -      if (!isCancelled) {
    -        rdd.context.submitJob(rdd, processPartition, partitions, 
resultHandler, resultFunc)
    -      } else {
    -        throw new SparkException("Action has been cancelled")
    -      }
    -    }
    -
    -    this.jobs = jobs ++ job.jobIds
    -
    -    // Wait for the job to complete. If the action is cancelled (with an 
interrupt),
    -    // cancel the job and stop the execution. This is not in a 
synchronized block because
    -    // Await.ready eventually waits on the monitor in FutureJob.jobWaiter.
    -    try {
    -      Await.ready(job, Duration.Inf)
    -    } catch {
    -      case e: InterruptedException =>
    -        job.cancel()
    -        throw new SparkException("Action has been cancelled")
    +    if (!isCancelled) {
    +      val job = rdd.context.submitJob(rdd, processPartition, partitions, 
resultHandler, resultFunc)
    +      subActions = job::subActions
    +      job
    +    } else {
    +      throw new SparkException("Action has been cancelled")
    --- End diff --
    
    do we need this? We already log this at L164


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