Repository: spark
Updated Branches:
  refs/heads/branch-1.6 6a88251ac -> d087acadf


[SPARK-11828][CORE] Register DAGScheduler metrics source after app id is known.

Author: Marcelo Vanzin <van...@cloudera.com>

Closes #9820 from vanzin/SPARK-11828.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/d087acad
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/d087acad
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/d087acad

Branch: refs/heads/branch-1.6
Commit: d087acadf10e446894b1d2bf0c9611b89eedc23f
Parents: 6a88251
Author: Marcelo Vanzin <van...@cloudera.com>
Authored: Thu Nov 19 14:53:58 2015 -0800
Committer: Andrew Or <and...@databricks.com>
Committed: Thu Nov 19 14:54:28 2015 -0800

----------------------------------------------------------------------
 core/src/main/scala/org/apache/spark/SparkContext.scala          | 1 +
 .../src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala | 4 +---
 2 files changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/d087acad/core/src/main/scala/org/apache/spark/SparkContext.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/SparkContext.scala 
b/core/src/main/scala/org/apache/spark/SparkContext.scala
index ab374cb..af4456c 100644
--- a/core/src/main/scala/org/apache/spark/SparkContext.scala
+++ b/core/src/main/scala/org/apache/spark/SparkContext.scala
@@ -581,6 +581,7 @@ class SparkContext(config: SparkConf) extends Logging with 
ExecutorAllocationCli
 
     // Post init
     _taskScheduler.postStartHook()
+    _env.metricsSystem.registerSource(_dagScheduler.metricsSource)
     _env.metricsSystem.registerSource(new 
BlockManagerSource(_env.blockManager))
     _executorAllocationManager.foreach { e =>
       _env.metricsSystem.registerSource(e.executorAllocationManagerSource)

http://git-wip-us.apache.org/repos/asf/spark/blob/d087acad/core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala 
b/core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala
index 4a9518f..ae725b4 100644
--- a/core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala
+++ b/core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala
@@ -130,7 +130,7 @@ class DAGScheduler(
 
   def this(sc: SparkContext) = this(sc, sc.taskScheduler)
 
-  private[scheduler] val metricsSource: DAGSchedulerSource = new 
DAGSchedulerSource(this)
+  private[spark] val metricsSource: DAGSchedulerSource = new 
DAGSchedulerSource(this)
 
   private[scheduler] val nextJobId = new AtomicInteger(0)
   private[scheduler] def numTotalJobs: Int = nextJobId.get()
@@ -1580,8 +1580,6 @@ class DAGScheduler(
     taskScheduler.stop()
   }
 
-  // Start the event thread and register the metrics source at the end of the 
constructor
-  env.metricsSystem.registerSource(metricsSource)
   eventProcessLoop.start()
 }
 


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

Reply via email to