Github user JoshRosen commented on the pull request:
https://github.com/apache/spark/pull/5335#issuecomment-91937369
See the description of PR #3121 for my previous discussion of this. If we
want to avoid introducing `vars` in SparkContext, one alternative would be to
move the creation of these components outside of the SparkContext constructor
and into a method in the companion object, putting the `try / catch` blocks
there. This lets us isolate the mutability into a single method, so things are
mutable while we're constructing SparkContext but are immutable once the object
has been fully constructed. I'm not sure whether this approach would be easier
or harder to understand than the mutable vars + getters used here.
---
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]