This is an automated email from the ASF dual-hosted git repository.

ctubbsii pushed a commit to branch elasticity
in repository https://gitbox.apache.org/repos/asf/accumulo.git

commit 5dbaec8f78c1ca5b4e13fcf53c8f2f1bc3bafc32
Merge: 3ee04b18b3 e16d51b457
Author: Christopher Tubbs <[email protected]>
AuthorDate: Fri Jul 26 08:00:20 2024 -0400

    Merge branch '2.1'

 .../java/org/apache/accumulo/core/clientImpl/ClientContext.java    | 5 +----
 .../java/org/apache/accumulo/server/metrics/MetricsInfoImpl.java   | 7 ++-----
 2 files changed, 3 insertions(+), 9 deletions(-)

diff --cc 
server/base/src/main/java/org/apache/accumulo/server/metrics/MetricsInfoImpl.java
index 3228cecaad,9053567dd5..7aafa1fbea
--- 
a/server/base/src/main/java/org/apache/accumulo/server/metrics/MetricsInfoImpl.java
+++ 
b/server/base/src/main/java/org/apache/accumulo/server/metrics/MetricsInfoImpl.java
@@@ -267,16 -264,20 +265,15 @@@ public class MetricsInfoImpl implement
      }
    }
  
 -  // support for org.apache.accumulo.core.metrics.MeterRegistryFactory can be 
removed in 3.1
    @VisibleForTesting
 -  @SuppressWarnings("deprecation")
    static MeterRegistry getRegistryFromFactory(final String factoryName, final 
ServerContext context)
-       throws ClassNotFoundException, NoSuchMethodException, 
InvocationTargetException,
-       InstantiationException, IllegalAccessException {
+       throws ReflectiveOperationException {
      try {
        LOG.info("look for meter spi registry factory {}", factoryName);
 -      Class<? extends 
org.apache.accumulo.core.spi.metrics.MeterRegistryFactory> clazz =
 -          ClassLoaderUtil.loadClass(factoryName,
 -              
org.apache.accumulo.core.spi.metrics.MeterRegistryFactory.class);
 -      org.apache.accumulo.core.spi.metrics.MeterRegistryFactory factory =
 -          clazz.getDeclaredConstructor().newInstance();
 -      
org.apache.accumulo.core.spi.metrics.MeterRegistryFactory.InitParameters 
initParameters =
 -          new MeterRegistryEnvPropImpl(context);
 +      Class<? extends MeterRegistryFactory> clazz =
 +          ClassLoaderUtil.loadClass(factoryName, MeterRegistryFactory.class);
 +      MeterRegistryFactory factory = 
clazz.getDeclaredConstructor().newInstance();
 +      MeterRegistryFactory.InitParameters initParameters = new 
MeterRegistryEnvPropImpl(context);
        return factory.create(initParameters);
      } catch (ClassCastException ex) {
        // empty. On exception try deprecated version

Reply via email to