aboutsummaryrefslogtreecommitdiffstats
path: root/clustercontroller-reindexer
diff options
context:
space:
mode:
authorgjoranv <gv@yahooinc.com>2023-06-21 17:43:15 +0200
committergjoranv <gv@yahooinc.com>2023-06-22 10:22:34 +0200
commit39d1271add1a2eee1af0c4338f8ad436c4308b57 (patch)
tree77954907289e8af7d56a89fa4525fd93d8369115 /clustercontroller-reindexer
parent5bb9f07c8eef46dc6396bab553b7b74db0ea5f0f (diff)
Replace metrics strings with the corresponding enum constants.
- Add 'metrics' as provided dep for clustercontroller-core
Diffstat (limited to 'clustercontroller-reindexer')
-rw-r--r--clustercontroller-reindexer/src/main/java/ai/vespa/reindexing/ReindexingMetrics.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/clustercontroller-reindexer/src/main/java/ai/vespa/reindexing/ReindexingMetrics.java b/clustercontroller-reindexer/src/main/java/ai/vespa/reindexing/ReindexingMetrics.java
index a1aa5287d2f..83be05d970e 100644
--- a/clustercontroller-reindexer/src/main/java/ai/vespa/reindexing/ReindexingMetrics.java
+++ b/clustercontroller-reindexer/src/main/java/ai/vespa/reindexing/ReindexingMetrics.java
@@ -1,6 +1,7 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package ai.vespa.reindexing;
+import ai.vespa.metrics.ClusterControllerMetrics;
import com.yahoo.documentapi.ProgressToken;
import com.yahoo.jdisc.Metric;
@@ -27,7 +28,7 @@ class ReindexingMetrics {
void dump(Reindexing reindexing) {
reindexing.status().forEach((type, status) -> {
- metric.set("reindexing.progress",
+ metric.set(ClusterControllerMetrics.REINDEXING_PROGRESS.baseName(),
status.progress().map(ProgressToken::percentFinished).map(percentage -> percentage * 1e-2)
.orElse(status.state() == SUCCESSFUL ? 1.0 : 0.0),
metric.createContext(Map.of("clusterid", cluster, "documenttype", type.getName())));