Github user ericl commented on the pull request:

    https://github.com/apache/spark/pull/12248#issuecomment-207534620
  
    It's not though, if you want to propagate something new without manually 
passing it through all your closures this cannot be done today.
    
    For example, consider a spark library that wants to implement a per-job 
`myLib.setLogLevel()` call. With context propagation you library author can 
provide semantics like this:
    
    ```
    myLib.setLogLevel(INFO)
    sc.parallelize(...).map(myLib.f1).filter(myLib.f2).collect()
    ```
    
    What you have to do now is something more like:
    ```
    sc.parallelize(...).map { x =>
      myLib.setLogLevel(INFO)
      myLib.f1(x)
    }.filter { y =>
      myLib.setLogLevel(INFO)
      myLib.f2(y)
    }.collect()
    ```
    
    which is more verbose and hard to maintain.


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

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

Reply via email to