Github user liancheng commented on the pull request:

    https://github.com/apache/spark/pull/2077#issuecomment-53654914
  
    Stages within a job can also form a DAG instead of a tree, e.g.:
    
    ```scala
    val a = sc.textFile("file").map(???).reduceByKey(???)
    val b = a.filter(???).reduceByKey(???)
    val c = a.map(???).reduceByKey(???)
    val d = (b ++ c).reduceByKey(???)
    d.collect()
    ```
    
    Each RDD introduces a shuffle in the case above, and the stage DAG looks 
roughly like:
    
    ```
       ar,bm           (The DAG grows from left to right)
      /     \
    am       br,cr,dm - dr
      \     /
       ar,cm
    ```
    
    where `xm` and `xr` means the mapper and reducer side of the shuffle 
introduced by RDD `x` respectively.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to