This is an automated email from the ASF dual-hosted git repository.
roryqi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git
The following commit(s) were added to refs/heads/master by this push:
new 3b016842e [MINOR] fix: Change to get coordinator appCurrent value from
metrics (#2129)
3b016842e is described below
commit 3b016842eba3b04603db5f44a2360bf6952eeedb
Author: maobaolong <[email protected]>
AuthorDate: Tue Sep 24 11:26:37 2024 +0800
[MINOR] fix: Change to get coordinator appCurrent value from metrics (#2129)
### What changes were proposed in this pull request?
Change to get coordinator appCurrent value from metrics
### Why are the changes needed?
Keep consistent with `appTotality`, and in case of incorrect result
returned from `getAppIds`.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
No need.
---
.../apache/uniffle/coordinator/web/resource/ApplicationResource.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/coordinator/src/main/java/org/apache/uniffle/coordinator/web/resource/ApplicationResource.java
b/coordinator/src/main/java/org/apache/uniffle/coordinator/web/resource/ApplicationResource.java
index eaa7695d3..c6cc60bef 100644
---
a/coordinator/src/main/java/org/apache/uniffle/coordinator/web/resource/ApplicationResource.java
+++
b/coordinator/src/main/java/org/apache/uniffle/coordinator/web/resource/ApplicationResource.java
@@ -51,7 +51,7 @@ public class ApplicationResource extends BaseResource {
return execute(
() -> {
Map<String, Integer> appTotalityMap = Maps.newHashMap();
- appTotalityMap.put("appCurrent",
getApplicationManager().getAppIds().size());
+ appTotalityMap.put("appCurrent", (int)
CoordinatorMetrics.gaugeRunningAppNum.get());
appTotalityMap.put("appTotality", (int)
CoordinatorMetrics.counterTotalAppNum.get());
return appTotalityMap;
});