Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/1736#discussion_r15730250
--- Diff:
core/src/main/scala/org/apache/spark/storage/BlockManagerSource.scala ---
@@ -46,9 +46,8 @@ private[spark] class BlockManagerSource(val blockManager:
BlockManager, sc: Spar
metricRegistry.register(MetricRegistry.name("memory", "memUsed_MB"), new
Gauge[Long] {
override def getValue: Long = {
val storageStatusList = blockManager.master.getStorageStatus
- val maxMem = storageStatusList.map(_.maxMem).sum
- val remainingMem = storageStatusList.map(_.memRemaining).sum
- (maxMem - remainingMem) / 1024 / 1024
+ val memUsed = storageStatusList.map(_.memUsed).sum
+ memUsed / 1024 / 1024
--- End diff --
We do the double slash in other places as well. Changing those too would
touch upon things I didn't touch in #1679, so I'd rather keep the changes in
this PR at the minimum while keeping the code consistent with the other places
in this file
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]