Github user tdas commented on the pull request:

    https://github.com/apache/spark/pull/2994#issuecomment-101376020
  
    The best way to use a broadcast variable is to make a transient lazy
    singleton.
    See the way I suggested for Accumulators in
    https://issues.apache.org/jira/browse/SPARK-5206
    
    On Tue, May 12, 2015 at 11:16 AM, Ben Fradet <[email protected]>
    wrote:
    
    > @tdas <https://github.com/tdas>
    >
    > Also, as we were discussing with @harishreedharan
    > <https://github.com/harishreedharan>, there is the issue of broadcasting
    > the producer config.
    >
    > Indeed, if we restore our streaming context from a checkpoint with
    > getOrCreate we'll get an exception when trying to use the broadcast
    > variable as broadcast variables are not checkpointed, this has already 
come
    > up on the mailing list
    > 
<http://apache-spark-user-list.1001560.n3.nabble.com/NullPointerException-on-reading-checkpoint-files-td7306.html>
    > .
    >
    > Maybe we should open a separate jira for this as this seems to be a valid
    > use case afaic.
    >
    > —
    > Reply to this email directly or view it on GitHub
    > <https://github.com/apache/spark/pull/2994#issuecomment-101372599>.
    >



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