Skip to content

Commit aadeda5

Browse files
committed
Merge pull request alteryx#144 from liancheng/runjob-clean
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`.
2 parents 951024f + a0c4565 commit aadeda5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

core/src/main/scala/org/apache/spark/SparkContext.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -796,11 +796,10 @@ class SparkContext(
796796
val cleanedFunc = clean(func)
797797
logInfo("Starting job: " + callSite)
798798
val start = System.nanoTime
799-
val result = dagScheduler.runJob(rdd, cleanedFunc, partitions, callSite, allowLocal,
799+
dagScheduler.runJob(rdd, cleanedFunc, partitions, callSite, allowLocal,
800800
resultHandler, localProperties.get)
801801
logInfo("Job finished: " + callSite + ", took " + (System.nanoTime - start) / 1e9 + " s")
802802
rdd.doCheckpoint()
803-
result
804803
}
805804

806805
/**

0 commit comments

Comments
 (0)