Skip to content

Commit

Permalink
Merge pull request alteryx#144 from liancheng/runjob-clean
Browse files Browse the repository at this point in the history
Removed unused return value in SparkContext.runJob

Return type of this `runJob` version is `Unit`:

    def runJob[T, U: ClassManifest](
        rdd: RDD[T],
        func: (TaskContext, Iterator[T]) => U,
        partitions: Seq[Int],
        allowLocal: Boolean,
        resultHandler: (Int, U) => Unit) {
        ...
    }

It's obviously unnecessary to "return" `result`.

(cherry picked from commit aadeda5)
Signed-off-by: Reynold Xin <[email protected]>
  • Loading branch information
rxin committed Nov 6, 2013
1 parent c8e0c0d commit 1d9412b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/src/main/scala/org/apache/spark/SparkContext.scala
Original file line number Diff line number Diff line change
Expand Up @@ -799,11 +799,10 @@ class SparkContext(
val cleanedFunc = clean(func)
logInfo("Starting job: " + callSite)
val start = System.nanoTime
val result = dagScheduler.runJob(rdd, cleanedFunc, partitions, callSite, allowLocal,
dagScheduler.runJob(rdd, cleanedFunc, partitions, callSite, allowLocal,
resultHandler, localProperties.get)
logInfo("Job finished: " + callSite + ", took " + (System.nanoTime - start) / 1e9 + " s")
rdd.doCheckpoint()
result
}

/**
Expand Down

0 comments on commit 1d9412b

Please sign in to comment.