singhpk234 commented on code in PR #4500:
URL: https://github.com/apache/iceberg/pull/4500#discussion_r842440405


##########
aws/src/main/java/org/apache/iceberg/aws/s3/S3FileIO.java:
##########
@@ -278,7 +278,8 @@ public void initialize(Map<String, String> properties) {
       this.metrics = ctor.newInstance("s3");
 
       metrics.initialize(properties);
-    } catch (NoSuchMethodException | ClassCastException e) {
+    } catch (NoClassDefFoundError | NoSuchMethodException | ClassCastException 
e) {
+      this.metrics = MetricsContext.nullMetrics();

Review Comment:
   [question] I believe we have set metrics to nullMetrics already here : 
   
https://github.com/apache/iceberg/blob/7c2ea0128133f630041ecb77de1fae754073e904/aws/src/main/java/org/apache/iceberg/aws/s3/S3FileIO.java#L76
   
   I belive then this would not be required here ? Should we do the same for 
all remaining filesIO's as well just in case someone tries to access the FileIO 
obj , without initialization (not sure how practical this case is though), Your 
thoughts



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to