Skip to content

Commit

Permalink
add partition index check to submitJob
Browse files Browse the repository at this point in the history
  • Loading branch information
liguoqiang committed Mar 2, 2014
1 parent 3a65903 commit e68210a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/src/main/scala/org/apache/spark/SparkContext.scala
Original file line number Diff line number Diff line change
Expand Up @@ -952,6 +952,8 @@ class SparkContext(
resultHandler: (Int, U) => Unit,
resultFunc: => R): SimpleFutureAction[R] =
{
val rddPartitions = rdd.partitions.map(_.index)
require(partitions.forall(rddPartitions.contains(_)), "partition index out of range")
val cleanF = clean(processPartition)
val callSite = getCallSite
val waiter = dagScheduler.submitJob(
Expand Down

0 comments on commit e68210a

Please sign in to comment.