SanjayMarreddi commented on code in PR #13348:
URL: https://github.com/apache/iceberg/pull/13348#discussion_r2157259220


##########
aws/src/main/java/org/apache/iceberg/aws/s3/S3FileIO.java:
##########
@@ -498,24 +495,7 @@ public void initialize(Map<String, String> props) {
       }
     }
 
-    initMetrics(properties);
-  }
-
-  @SuppressWarnings("CatchBlockLogException")
-  private void initMetrics(Map<String, String> props) {
-    // Report Hadoop metrics if Hadoop is available
-    try {
-      DynConstructors.Ctor<MetricsContext> ctor =
-          DynConstructors.builder(MetricsContext.class)
-              .hiddenImpl(DEFAULT_METRICS_IMPL, String.class)
-              .buildChecked();
-      MetricsContext context = ctor.newInstance(ROOT_PREFIX);
-      context.initialize(props);
-      this.metrics = context;
-    } catch (NoClassDefFoundError | NoSuchMethodException | ClassCastException 
e) {
-      LOG.warn(
-          "Unable to load metrics class: '{}', falling back to null metrics", 
DEFAULT_METRICS_IMPL);
-    }
+    this.metrics = S3RequestUtil.initMetrics(properties);

Review Comment:
   As mentioned above, this change is reverted now..



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to