dlmarion commented on code in PR #6080:
URL: https://github.com/apache/accumulo/pull/6080#discussion_r2737931252
##########
server/manager/src/main/java/org/apache/accumulo/manager/metrics/ManagerMetrics.java:
##########
@@ -53,6 +55,24 @@ public class ManagerMetrics implements MetricsProducer {
private final AtomicLong metadataTGWErrorsGauge = new AtomicLong(0);
private final AtomicLong userTGWErrorsGauge = new AtomicLong(0);
private final AtomicInteger compactionConfigurationError = new
AtomicInteger(0);
+ private final AtomicInteger goalState = new AtomicInteger(0);
+
+ public void updateManagerGoalState(ManagerGoalState goal) {
+ switch (goal) {
+ case CLEAN_STOP:
+ goalState.set(0);
+ break;
+ case NORMAL:
+ goalState.set(2);
+ break;
+ case SAFE_MODE:
+ goalState.set(1);
+ break;
+ default:
+ goalState.set(-1);
+ throw new IllegalStateException("Unhandled manager goal state: " +
goal);
+ }
+ }
Review Comment:
The unknown (-1) value is not set in this case, but it's in the metric
description that you provided. I don't remember the semantics of this newer
syntax, what happens in the default case?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]