You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by mm...@apache.org on 2022/09/28 10:55:05 UTC
[accumulo] branch main updated: Revert "Modify FateMetrics to enforce ReadOnlyStore required for ZooKeeper (#2810)" (#2971)
This is an automated email from the ASF dual-hosted git repository.
mmiller pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/main by this push:
new 5d37b28e08 Revert "Modify FateMetrics to enforce ReadOnlyStore required for ZooKeeper (#2810)" (#2971)
5d37b28e08 is described below
commit 5d37b28e08447fb6aea3d42b962483bd86a3f5bc
Author: Mike Miller <mm...@apache.org>
AuthorDate: Wed Sep 28 10:54:58 2022 +0000
Revert "Modify FateMetrics to enforce ReadOnlyStore required for ZooKeeper (#2810)" (#2971)
This reverts commit 76092fc58eab7a3d4cc1fb87c376dc25b6f87537.
---
.../org/apache/accumulo/manager/metrics/fate/FateMetrics.java | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/server/manager/src/main/java/org/apache/accumulo/manager/metrics/fate/FateMetrics.java b/server/manager/src/main/java/org/apache/accumulo/manager/metrics/fate/FateMetrics.java
index c34e0e5f64..99398d5a03 100644
--- a/server/manager/src/main/java/org/apache/accumulo/manager/metrics/fate/FateMetrics.java
+++ b/server/manager/src/main/java/org/apache/accumulo/manager/metrics/fate/FateMetrics.java
@@ -28,7 +28,6 @@ import org.apache.accumulo.core.Constants;
import org.apache.accumulo.core.metrics.MetricsProducer;
import org.apache.accumulo.core.metrics.MetricsUtil;
import org.apache.accumulo.core.util.threads.ThreadPools;
-import org.apache.accumulo.fate.ReadOnlyStore;
import org.apache.accumulo.fate.ReadOnlyTStore;
import org.apache.accumulo.fate.ZooStore;
import org.apache.accumulo.server.ServerContext;
@@ -50,7 +49,7 @@ public class FateMetrics implements MetricsProducer {
private static final String OP_TYPE_TAG = "op.type";
private final ServerContext context;
- private final ReadOnlyStore<FateMetrics> zooStore;
+ private final ReadOnlyTStore<FateMetrics> zooStore;
private final String fateRootPath;
private final long refreshDelay;
@@ -72,8 +71,7 @@ public class FateMetrics implements MetricsProducer {
this.refreshDelay = Math.max(DEFAULT_MIN_REFRESH_DELAY, minimumRefreshDelay);
try {
- this.zooStore =
- new ReadOnlyStore<>(new ZooStore<>(fateRootPath, context.getZooReaderWriter()));
+ this.zooStore = new ZooStore<>(fateRootPath, context.getZooReaderWriter());
} catch (KeeperException ex) {
throw new IllegalStateException(
"FATE Metrics - Failed to create zoo store - metrics unavailable", ex);
@@ -122,8 +120,9 @@ public class FateMetrics implements MetricsProducer {
}
}
- metricValues.getOpTypeCounters().forEach((name, count) -> Metrics
- .gauge(METRICS_FATE_TYPE_IN_PROGRESS, Tags.of(OP_TYPE_TAG, name), count));
+ metricValues.getOpTypeCounters().forEach((name, count) -> {
+ Metrics.gauge(METRICS_FATE_TYPE_IN_PROGRESS, Tags.of(OP_TYPE_TAG, name), count);
+ });
}
@Override