This is an automated email from the ASF dual-hosted git repository.
rexxiong pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/celeborn.git
The following commit(s) were added to refs/heads/main by this push:
new cdb5d21d1 [CELEBORN-1581] Fix incorrect metrics of
DeviceCelebornFreeBytes and DeviceCelebornTotalBytes
cdb5d21d1 is described below
commit cdb5d21d12fa581987591cac18824d2342d3008f
Author: mingji <[email protected]>
AuthorDate: Tue Aug 27 20:38:36 2024 +0800
[CELEBORN-1581] Fix incorrect metrics of DeviceCelebornFreeBytes and
DeviceCelebornTotalBytes
### What changes were proposed in this pull request?
Fix incorrect metrics.
### Why are the changes needed?
The variable `statusSystem.workers` is a set that caused metrics output to
be incorrect.
### Does this PR introduce _any_ user-facing change?
NO.
### How was this patch tested?
GA.
<img width="729" alt="截屏2024-08-27 16 48 35"
src="https://github.com/user-attachments/assets/c221b680-917a-4207-91fc-c142fac64b65">
Closes #2708 from FMX/b1581.
Authored-by: mingji <[email protected]>
Signed-off-by: Shuang <[email protected]>
---
.../main/scala/org/apache/celeborn/service/deploy/master/Master.scala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/master/src/main/scala/org/apache/celeborn/service/deploy/master/Master.scala
b/master/src/main/scala/org/apache/celeborn/service/deploy/master/Master.scala
index fa386e70e..bf9b5ba2d 100644
---
a/master/src/main/scala/org/apache/celeborn/service/deploy/master/Master.scala
+++
b/master/src/main/scala/org/apache/celeborn/service/deploy/master/Master.scala
@@ -256,11 +256,11 @@ private[celeborn] class Master(
}
masterSource.addGauge(MasterSource.DEVICE_CELEBORN_TOTAL_CAPACITY) { () =>
- statusSystem.workers.asScala.map(_.totalSpace()).sum
+ statusSystem.workers.asScala.toList.map(_.totalSpace()).sum
}
masterSource.addGauge(MasterSource.DEVICE_CELEBORN_FREE_CAPACITY) { () =>
- statusSystem.workers.asScala.map(_.totalActualUsableSpace()).sum
+ statusSystem.workers.asScala.toList.map(_.totalActualUsableSpace()).sum
}
masterSource.addGauge(MasterSource.IS_ACTIVE_MASTER) { () => isMasterActive }