ctubbsii commented on code in PR #5605:
URL: https://github.com/apache/accumulo/pull/5605#discussion_r2129777116
##########
core/src/main/java/org/apache/accumulo/core/util/threads/ThreadPools.java:
##########
@@ -99,9 +100,14 @@ public static final ThreadPools getServerThreadPools() {
return SERVER_INSTANCE;
}
- public static final ThreadPools
getClientThreadPools(UncaughtExceptionHandler ueh) {
+ public static final ThreadPools getClientThreadPools(AccumuloConfiguration
conf,
+ UncaughtExceptionHandler ueh) {
ThreadPools clientPools = new ThreadPools(ueh);
- clientPools.setMeterRegistry(Metrics.globalRegistry);
+ if (conf.getBoolean(Property.GENERAL_MICROMETER_ENABLED) == false) {
+ clientPools.disableThreadPoolMetrics();
+ } else {
+ clientPools.setMeterRegistry(Metrics.globalRegistry);
+ }
Review Comment:
To improve readability, this could be written as:
```java
if (conf.getBoolean(Property.GENERAL_MICROMETER_ENABLED)) {
clientPools.setMeterRegistry(Metrics.globalRegistry);
} else {
clientPools.disableThreadPoolMetrics();
}
```
--
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]