Skip to content

Commit

Permalink
[SPARK-22135] metrics in spark-dispatcher not being registered proper…
Browse files Browse the repository at this point in the history
…ly - use vals
  • Loading branch information
Paul Mackles committed Sep 27, 2017
1 parent a327419 commit b11a448
Showing 1 changed file with 2 additions and 3 deletions.
Expand Up @@ -23,10 +23,9 @@ import org.apache.spark.metrics.source.Source

private[mesos] class MesosClusterSchedulerSource(scheduler: MesosClusterScheduler)
extends Source {
private val registry = new MetricRegistry()

override def sourceName: String = "mesos_cluster"
override def metricRegistry: MetricRegistry = registry
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
Expand Down

0 comments on commit b11a448

Please sign in to comment.