diff options
author | Patrick Wendell <pwendell@gmail.com> | 2013-10-09 11:16:24 -0700 |
---|---|---|
committer | Patrick Wendell <pwendell@gmail.com> | 2013-10-09 11:16:24 -0700 |
commit | bd3bcc5f8e0db32679fe92705d0f7f3dd4360721 (patch) | |
tree | f21884eaae3d47833b912d2b2705eb86f630cc9c | |
parent | 19d445d37c38a35cc68da91f53a8780b89a1f8c9 (diff) | |
download | spark-bd3bcc5f8e0db32679fe92705d0f7f3dd4360721.tar.gz spark-bd3bcc5f8e0db32679fe92705d0f7f3dd4360721.tar.bz2 spark-bd3bcc5f8e0db32679fe92705d0f7f3dd4360721.zip |
Use standard abbreviations in metrics labels
-rw-r--r-- | core/src/main/scala/org/apache/spark/deploy/worker/WorkerSource.scala | 4 | ||||
-rw-r--r-- | core/src/main/scala/org/apache/spark/storage/BlockManagerSource.scala | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/core/src/main/scala/org/apache/spark/deploy/worker/WorkerSource.scala b/core/src/main/scala/org/apache/spark/deploy/worker/WorkerSource.scala index b24e936b1f..b7ddd8c816 100644 --- a/core/src/main/scala/org/apache/spark/deploy/worker/WorkerSource.scala +++ b/core/src/main/scala/org/apache/spark/deploy/worker/WorkerSource.scala @@ -35,7 +35,7 @@ private[spark] class WorkerSource(val worker: Worker) extends Source { }) // Gauge for memory used of this worker - metricRegistry.register(MetricRegistry.name("memUsed_MBytes"), new Gauge[Int] { + metricRegistry.register(MetricRegistry.name("memUsed_MB"), new Gauge[Int] { override def getValue: Int = worker.memoryUsed }) @@ -45,7 +45,7 @@ private[spark] class WorkerSource(val worker: Worker) extends Source { }) // Gauge for memory free of this worker - metricRegistry.register(MetricRegistry.name("memFree_MBytes"), new Gauge[Int] { + metricRegistry.register(MetricRegistry.name("memFree_MB"), new Gauge[Int] { override def getValue: Int = worker.memoryFree }) } diff --git a/core/src/main/scala/org/apache/spark/storage/BlockManagerSource.scala b/core/src/main/scala/org/apache/spark/storage/BlockManagerSource.scala index e5068d5587..365866d1e3 100644 --- a/core/src/main/scala/org/apache/spark/storage/BlockManagerSource.scala +++ b/core/src/main/scala/org/apache/spark/storage/BlockManagerSource.scala @@ -28,7 +28,7 @@ private[spark] class BlockManagerSource(val blockManager: BlockManager, sc: Spar val metricRegistry = new MetricRegistry() val sourceName = "%s.BlockManager".format(sc.appName) - metricRegistry.register(MetricRegistry.name("memory", "maxMem_MBytes"), new Gauge[Long] { + metricRegistry.register(MetricRegistry.name("memory", "maxMem_MB"), new Gauge[Long] { override def getValue: Long = { val storageStatusList = blockManager.master.getStorageStatus val maxMem = storageStatusList.map(_.maxMem).reduce(_ + _) @@ -36,7 +36,7 @@ private[spark] class BlockManagerSource(val blockManager: BlockManager, sc: Spar } }) - metricRegistry.register(MetricRegistry.name("memory", "remainingMem_MBytes"), new Gauge[Long] { + metricRegistry.register(MetricRegistry.name("memory", "remainingMem_MB"), new Gauge[Long] { override def getValue: Long = { val storageStatusList = blockManager.master.getStorageStatus val remainingMem = storageStatusList.map(_.memRemaining).reduce(_ + _) @@ -44,7 +44,7 @@ private[spark] class BlockManagerSource(val blockManager: BlockManager, sc: Spar } }) - metricRegistry.register(MetricRegistry.name("memory", "memUsed_MBytes"), new Gauge[Long] { + metricRegistry.register(MetricRegistry.name("memory", "memUsed_MB"), new Gauge[Long] { override def getValue: Long = { val storageStatusList = blockManager.master.getStorageStatus val maxMem = storageStatusList.map(_.maxMem).reduce(_ + _) @@ -53,7 +53,7 @@ private[spark] class BlockManagerSource(val blockManager: BlockManager, sc: Spar } }) - metricRegistry.register(MetricRegistry.name("disk", "diskSpaceUsed_MBytes"), new Gauge[Long] { + metricRegistry.register(MetricRegistry.name("disk", "diskSpaceUsed_MB"), new Gauge[Long] { override def getValue: Long = { val storageStatusList = blockManager.master.getStorageStatus val diskSpaceUsed = storageStatusList |