You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by JoshRosen <gi...@git.apache.org> on 2014/11/29 20:48:06 UTC

[GitHub] spark pull request: [SPARK-4654] Clean up DAGScheduler getMissingP...

GitHub user JoshRosen opened a pull request:

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

    [SPARK-4654] Clean up DAGScheduler getMissingParentStages / stageDependsOn methods

    DAGScheduler has getMissingParentStages() and stageDependsOn() methods which are suspiciously similar to getParentStages().
    
    Both of these methods perform traversals of the RDD / Stage graph to inspect parent stages. We can remove both of these methods, though: the set of parent stages is known when a Stage instance is constructed and is stored in Stage.parents, so we can just check for missing stages by looking for unavailable stages in Stage.parents. Similarly, we can determine whether one stage depends on another by searching Stage.parents rather than performing a graph traversal from scratch.

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

    $ git pull https://github.com/JoshRosen/spark dagscheduler-missingparents-cleanup

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

    https://github.com/apache/spark/pull/3515.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 #3515
    
----
commit 1ab3d6de26ded994412d384b273fa16f7eed1f1f
Author: Josh Rosen <jo...@databricks.com>
Date:   2014-11-29T19:34:43Z

    Clean up DAGScheduler getMissingParentStages / stageDependsOn methods.

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-4654] Clean up DAGScheduler getMissingP...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/3515#issuecomment-64972773
  
      [Test build #23954 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/23954/consoleFull) for   PR 3515 at commit [`8aee34d`](https://github.com/apache/spark/commit/8aee34df339ddb272df3a986bc706238d0dd4536).
     * This patch merges cleanly.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-4654] Clean up DAGScheduler getMissingP...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/3515#issuecomment-64966682
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/23950/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-4654] Clean up DAGScheduler getMissingP...

Posted by JoshRosen <gi...@git.apache.org>.
Github user JoshRosen commented on the pull request:

    https://github.com/apache/spark/pull/3515#issuecomment-64976003
  
    It looks like the tests have failed twice with the same error, so this looks like it might be a legitimate bug.  That would be surprising, since it would seem to indicate that there's some latent complexity in the old code that I overlooked.  I'll investigate this tomorrow if I have time.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-4654] Clean up DAGScheduler getMissingP...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/3515#issuecomment-64975039
  
    **[Test build #23954 timed out](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/23954/consoleFull)**     for PR 3515 at commit [`8aee34d`](https://github.com/apache/spark/commit/8aee34df339ddb272df3a986bc706238d0dd4536)     after a configured wait of `120m`.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-4654] Clean up DAGScheduler getMissingP...

Posted by JoshRosen <gi...@git.apache.org>.
Github user JoshRosen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/3515#discussion_r21055836
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala ---
    @@ -401,7 +370,7 @@ class DAGScheduler(
             val s = stages.head
             s.jobIds += jobId
             jobIdToStageIds.getOrElseUpdate(jobId, new HashSet[Int]()) += s.id
    -        val parents: List[Stage] = getParentStages(s.rdd, jobId)
    --- End diff --
    
    It might look like this changes the behavior of this method, since `getParentStages` will create any parent stages that are missing.  However, I think that this call never ended up taking the "create a missing stage" branch because `stage`'s parent stages should have already been created before it was created, since `getParentStages(stage.rdd, jobId)` should have been called from the `newStage` method: https://github.com/JoshRosen/spark/blob/dagscheduler-missingparents-cleanup/core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala#L247


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-4654] Clean up DAGScheduler getMissingP...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/3515#issuecomment-64966679
  
    **[Test build #23950 timed out](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/23950/consoleFull)**     for PR 3515 at commit [`1ab3d6d`](https://github.com/apache/spark/commit/1ab3d6de26ded994412d384b273fa16f7eed1f1f)     after a configured wait of `120m`.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-4654] Clean up DAGScheduler getMissingP...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/3515#issuecomment-64963143
  
      [Test build #23950 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/23950/consoleFull) for   PR 3515 at commit [`1ab3d6d`](https://github.com/apache/spark/commit/1ab3d6de26ded994412d384b273fa16f7eed1f1f).
     * This patch merges cleanly.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-4654] Clean up DAGScheduler getMissingP...

Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on the pull request:

    https://github.com/apache/spark/pull/3515#issuecomment-70468111
  
    Looks like this has gone stale so I'd like to close this issue pending an update form @JoshRosen 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-4654] Clean up DAGScheduler getMissingP...

Posted by JoshRosen <gi...@git.apache.org>.
Github user JoshRosen commented on the pull request:

    https://github.com/apache/spark/pull/3515#issuecomment-65183834
  
    I haven't had a chance to dig into this much more, but perhaps this could be due to streaming checkpointing; if RDDs' dependencies change after checkpointing, then that might mean that we need to re-walk the stage / dependency graph rather than relying on the cached results of the earlier traversal.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-4654] Clean up DAGScheduler getMissingP...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-4654] Clean up DAGScheduler getMissingP...

Posted by CodEnFisH <gi...@git.apache.org>.
Github user CodEnFisH commented on the pull request:

    https://github.com/apache/spark/pull/3515#issuecomment-65181037
  
    I reproduced the failed testing locally and took a look at the log.
    
    The failed test case ("awaitTermination with error in task") is to check if task failure is successfully captured by the system. 
    
    But it seems that DAGScheduler doesn't fail the job although its task fails. The reason is that the job does NOT depend on the failed task. In my log, I saw "Ignoring failure of Stage 0 because all jobs depending on it are done" which is printed at the end of abortStage() of DAGScheduler. So the job is not aborted and the exception is not captured. 



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-4654] Clean up DAGScheduler getMissingP...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/3515#issuecomment-64975041
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/23954/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-4654] Clean up DAGScheduler getMissingP...

Posted by markhamstra <gi...@git.apache.org>.
Github user markhamstra commented on a diff in the pull request:

    https://github.com/apache/spark/pull/3515#discussion_r21056495
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala ---
    @@ -401,7 +370,7 @@ class DAGScheduler(
             val s = stages.head
             s.jobIds += jobId
             jobIdToStageIds.getOrElseUpdate(jobId, new HashSet[Int]()) += s.id
    -        val parents: List[Stage] = getParentStages(s.rdd, jobId)
    +        val parents: List[Stage] = stage.parents
             val parentsWithoutThisJobId = parents.filter { ! _.jobIds.contains(jobId) }
    --- End diff --
    
    I wouldn't bother binding a local anymore, so just:
    ```scala
    val parentsWithoutThisJobId = stage.parents.filter { ! _.jobIds.contains(jobId) }
    ```


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org