spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From js...@apache.org
Subject spark git commit: [SPARK-22135][MESOS] metrics in spark-dispatcher not being registered properly
Date Thu, 28 Sep 2017 06:44:01 GMT
Repository: spark
Updated Branches:
  refs/heads/branch-2.2 42e172744 -> 12a74e352


[SPARK-22135][MESOS] metrics in spark-dispatcher not being registered properly

## What changes were proposed in this pull request?

Fix a trivial bug with how metrics are registered in the mesos dispatcher. Bug resulted in
creating a new registry each time the metricRegistry() method was called.

## How was this patch tested?

Verified manually on local mesos setup

Author: Paul Mackles <pmackles@adobe.com>

Closes #19358 from pmackles/SPARK-22135.

(cherry picked from commit f20be4d70bf321f377020d1bde761a43e5c72f0a)
Signed-off-by: jerryshao <sshao@hortonworks.com>


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

Branch: refs/heads/branch-2.2
Commit: 12a74e352b6ebb3ee7610b0290f6aacf08a40040
Parents: 42e1727
Author: Paul Mackles <pmackles@adobe.com>
Authored: Thu Sep 28 14:43:31 2017 +0800
Committer: jerryshao <sshao@hortonworks.com>
Committed: Thu Sep 28 14:43:53 2017 +0800

----------------------------------------------------------------------
 .../scheduler/cluster/mesos/MesosClusterSchedulerSource.scala   | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/12a74e35/resource-managers/mesos/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosClusterSchedulerSource.scala
----------------------------------------------------------------------
diff --git a/resource-managers/mesos/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosClusterSchedulerSource.scala
b/resource-managers/mesos/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosClusterSchedulerSource.scala
index 1fe9497..76aded4 100644
--- a/resource-managers/mesos/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosClusterSchedulerSource.scala
+++ b/resource-managers/mesos/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosClusterSchedulerSource.scala
@@ -23,8 +23,9 @@ import org.apache.spark.metrics.source.Source
 
 private[mesos] class MesosClusterSchedulerSource(scheduler: MesosClusterScheduler)
   extends Source {
-  override def sourceName: String = "mesos_cluster"
-  override def metricRegistry: MetricRegistry = new MetricRegistry()
+
+  override val sourceName: String = "mesos_cluster"
+  override val metricRegistry: MetricRegistry = new MetricRegistry()
 
   metricRegistry.register(MetricRegistry.name("waitingDrivers"), new Gauge[Int] {
     override def getValue: Int = scheduler.getQueuedDriversSize


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


Mime
View raw message