aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Musum <musum@yahooinc.com>2023-03-27 09:29:20 +0200
committerHarald Musum <musum@yahooinc.com>2023-03-27 09:29:20 +0200
commitb4deea460ed60e09df90549e29f512f8fed74828 (patch)
tree1fd6ff0375c7208436ac33ddd28d5f2ddfc575c0
parentfd247da0ffae2cde82efddc5bb427734ce945c1b (diff)
Rename method
-rw-r--r--clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/AggregatedStatsMergePendingChecker.java2
-rw-r--r--clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/ClusterStatsAggregator.java4
-rw-r--r--clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/ContentClusterStats.java14
-rw-r--r--clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/status/statuspage/VdsClusterHtmlRenderer.java2
4 files changed, 12 insertions, 10 deletions
diff --git a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/AggregatedStatsMergePendingChecker.java b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/AggregatedStatsMergePendingChecker.java
index 336f43043d7..f5f76f97a4d 100644
--- a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/AggregatedStatsMergePendingChecker.java
+++ b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/AggregatedStatsMergePendingChecker.java
@@ -22,7 +22,7 @@ public class AggregatedStatsMergePendingChecker implements MergePendingChecker {
if (!stats.hasUpdatesFromAllDistributors()) {
return true;
}
- ContentNodeStats nodeStats = stats.getStats().getContentNode(contentNodeIndex);
+ ContentNodeStats nodeStats = stats.getStats().getNodeStats(contentNodeIndex);
if (nodeStats != null) {
ContentNodeStats.BucketSpaceStats bucketSpaceStats = nodeStats.getBucketSpace(bucketSpace);
return (bucketSpaceStats != null &&
diff --git a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/ClusterStatsAggregator.java b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/ClusterStatsAggregator.java
index a21185ce41d..f28e2edbff5 100644
--- a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/ClusterStatsAggregator.java
+++ b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/ClusterStatsAggregator.java
@@ -93,13 +93,13 @@ public class ClusterStatsAggregator {
for (ContentNodeStats contentNode : aggregatedStats) {
Integer nodeIndex = contentNode.getNodeIndex();
- ContentNodeStats statsToAdd = clusterStats.getContentNode(nodeIndex);
+ ContentNodeStats statsToAdd = clusterStats.getNodeStats(nodeIndex);
if (statsToAdd != null) {
contentNode.add(statsToAdd);
}
if (prevClusterStats != null) {
- ContentNodeStats statsToSubtract = prevClusterStats.getContentNode(nodeIndex);
+ ContentNodeStats statsToSubtract = prevClusterStats.getNodeStats(nodeIndex);
if (statsToSubtract != null) {
contentNode.subtract(statsToSubtract);
}
diff --git a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/ContentClusterStats.java b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/ContentClusterStats.java
index 6f6dd664f31..7f421e8bff9 100644
--- a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/ContentClusterStats.java
+++ b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/ContentClusterStats.java
@@ -1,7 +1,12 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.clustercontroller.core;
-import java.util.*;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
/**
* Class for storing pending content node stats for all content nodes in the cluster.
@@ -29,9 +34,7 @@ public class ContentClusterStats implements Iterable<ContentNodeStats> {
return mapToNodeStats.values().iterator();
}
- public ContentNodeStats getContentNode(Integer index) {
- return mapToNodeStats.get(index);
- }
+ public ContentNodeStats getNodeStats(Integer index) { return mapToNodeStats.get(index);}
public int size() {
return mapToNodeStats.size();
@@ -52,7 +55,6 @@ public class ContentClusterStats implements Iterable<ContentNodeStats> {
@Override
public String toString() {
- return String.format("{mapToNodeStats=[%s]}",
- Arrays.toString(mapToNodeStats.entrySet().toArray()));
+ return String.format("{mapToNodeStats=[%s]}", Arrays.toString(mapToNodeStats.entrySet().toArray()));
}
}
diff --git a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/status/statuspage/VdsClusterHtmlRenderer.java b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/status/statuspage/VdsClusterHtmlRenderer.java
index 363eec4e8e4..547647e82e6 100644
--- a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/status/statuspage/VdsClusterHtmlRenderer.java
+++ b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/status/statuspage/VdsClusterHtmlRenderer.java
@@ -419,7 +419,7 @@ public class VdsClusterHtmlRenderer {
private static ContentNodeStats.BucketSpaceStats getStatsForContentNode(ClusterStatsAggregator statsAggregator,
NodeInfo nodeInfo,
String bucketSpace) {
- ContentNodeStats nodeStats = statsAggregator.getAggregatedStats().getStats().getContentNode(nodeInfo.getNodeIndex());
+ ContentNodeStats nodeStats = statsAggregator.getAggregatedStats().getStats().getNodeStats(nodeInfo.getNodeIndex());
if (nodeStats != null) {
return nodeStats.getBucketSpace(bucketSpace);
}