GitHub user CodingCat opened a pull request:

    https://github.com/apache/spark/pull/210

    SPARK-1298: remove duplicate partitionID checking

    In the current implementation, we check whether partitionIDs is >=0 & < 
maxPartitionNum in SparkContext.runJob()
    
    
https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/SparkContext.scala#L896
    
    However, immediately following, in DAGScheduler (calling path 
SparkContext.runJob -> DAGScheduler.runJob -> DAGScheduler.submitJob)
    
    we check it again, (just missing a < 0 condition),
    
    
https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala#L432
    
    I propose to remove the SparkContext one and check it in DAGScheduler 
(which makes more sense, from my view, as DAGScheduler handles everything about 
job, it should check whether the input of the job is valid before running it. 
But SparkContext is something more like a user-facing interface)
    
    at least we should check it in only one place....


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/CodingCat/spark SPARK-1298

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/210.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #210
    
----
commit cb90606daa520d6a1d70b04030905e4025345b3a
Author: CodingCat <[email protected]>
Date:   2014-03-23T18:43:46Z

    remove duplicate partitionID checking

----


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

Reply via email to