diff options
author | Harald Musum <musum@yahooinc.com> | 2023-06-22 07:59:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-22 07:59:02 +0200 |
commit | 8773f8f9934e2d99182ac717774f4fe2fa4d5c9e (patch) | |
tree | f7f184df1e09bbad350f026bb3e2e8905b269662 /clustercontroller-core | |
parent | cd9332c9d57eb9e0dab825ec939785e1951b933a (diff) |
Revert "Replace metrics strings with the corresponding enum constants."
Diffstat (limited to 'clustercontroller-core')
3 files changed, 4 insertions, 12 deletions
diff --git a/clustercontroller-core/pom.xml b/clustercontroller-core/pom.xml index e9d83cee7fc..647d8ca4e64 100644 --- a/clustercontroller-core/pom.xml +++ b/clustercontroller-core/pom.xml @@ -20,12 +20,6 @@ <scope>provided</scope> </dependency> <dependency> - <groupId>com.yahoo.vespa</groupId> - <artifactId>metrics</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - <dependency> <!-- required for bundle-plugin to generate import-package statements for Java's standard library --> <groupId>com.yahoo.vespa</groupId> <artifactId>jdisc_core</artifactId> diff --git a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/NodeStateChangeChecker.java b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/NodeStateChangeChecker.java index 60671c96474..c823c94afd1 100644 --- a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/NodeStateChangeChecker.java +++ b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/NodeStateChangeChecker.java @@ -1,7 +1,6 @@ // 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 ai.vespa.metrics.StorageMetrics; import com.yahoo.lang.MutableBoolean; import com.yahoo.lang.SettableOptional; import com.yahoo.vdslib.distribution.ConfiguredNode; @@ -45,7 +44,7 @@ import static java.util.logging.Level.FINE; public class NodeStateChangeChecker { private static final Logger log = Logger.getLogger(NodeStateChangeChecker.class.getName()); - private static final String BUCKETS_METRIC_NAME = StorageMetrics.VDS_DATASTORED_BUCKET_SPACE_BUCKETS_TOTAL.baseName(); + private static final String BUCKETS_METRIC_NAME = "vds.datastored.bucket_space.buckets_total"; private static final Map<String, String> BUCKETS_METRIC_DIMENSIONS = Map.of("bucketSpace", "default"); private final int requiredRedundancy; diff --git a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/restapiv2/requests/NodeStateRequest.java b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/restapiv2/requests/NodeStateRequest.java index 09aac786b2f..65c08e67850 100644 --- a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/restapiv2/requests/NodeStateRequest.java +++ b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/restapiv2/requests/NodeStateRequest.java @@ -1,7 +1,6 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.clustercontroller.core.restapiv2.requests; -import ai.vespa.metrics.StorageMetrics; import com.yahoo.vespa.clustercontroller.core.NodeInfo; import com.yahoo.vespa.clustercontroller.core.RemoteClusterControllerTask; import com.yahoo.vespa.clustercontroller.core.hostinfo.Metrics; @@ -47,17 +46,17 @@ public class NodeStateRequest extends Request<Response.NodeResponse> { } private static void fillInMetricValue(String name, Metrics.Value value, Response.NodeResponse result) { - if (name.equals(StorageMetrics.VDS_DATASTORED_ALLDISKS_DOCS.baseName())) { + if (name.equals("vds.datastored.alldisks.docs")) { if (value.getLast() == null) { return; } result.addMetric("unique-document-count", value.getLast()); - } else if (name.equals(StorageMetrics.VDS_DATASTORED_ALLDISKS_BYTES.baseName())) { + } else if (name.equals("vds.datastored.alldisks.bytes")) { if (value.getLast() == null) { return; } result.addMetric("unique-document-total-size", value.getLast()); - } else if (name.equals(StorageMetrics.VDS_DATASTORED_ALLDISKS_BUCKETS.baseName())) { + } else if (name.equals("vds.datastored.alldisks.buckets")) { if (value.getLast() == null) { return; } |