Github user markhamstra commented on a diff in the pull request:
https://github.com/apache/spark/pull/637#discussion_r12299198
--- Diff: core/src/main/scala/org/apache/spark/SparkContext.scala ---
@@ -300,13 +300,7 @@ class SparkContext(config: SparkConf) extends Logging {
// Create and start the scheduler
private[spark] var taskScheduler =
SparkContext.createTaskScheduler(this, master)
- @volatile private[spark] var dagScheduler: DAGScheduler = _
- try {
- dagScheduler = new DAGScheduler(this)
- } catch {
- case e: Exception => throw
- new SparkException("DAGScheduler cannot be initialized due to
%s".format(e.getMessage))
- }
+ @volatile private[spark] var dagScheduler: DAGScheduler = new
DAGScheduler(this)
--- End diff --
While we are messing with dagScheduler, I'd prefer that it not be mutable
everywhere within the spark namespace. It looks like it is that way purely for
testing purposes, and that it can be turned into a private val while only
exposing a mutable Boolean flag to the rest of spark.
https://github.com/markhamstra/spark/compare/CodingCat:SPARK-1715...SPARK-1715?expand=1
---
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.
---