rajarshisarkar opened a new pull request, #4500:
URL: https://github.com/apache/iceberg/pull/4500

   Recently encountered the following exception in 
https://github.com/apache/iceberg/pull/4489#discussion_r842375076:
   ```
   org/apache/hadoop/fs/FileSystem
   java.lang.NoClassDefFoundError: org/apache/hadoop/fs/FileSystem
        at 
org.apache.iceberg.hadoop.HadoopMetricsContext.initialize(HadoopMetricsContext.java:50)
        at org.apache.iceberg.dell.ecs.EcsFileIO.initialize(EcsFileIO.java:92)
        at 
org.apache.iceberg.dell.ecs.EcsCatalog.initializeFileIO(EcsCatalog.java:131)
        at 
org.apache.iceberg.dell.ecs.EcsCatalog.initialize(EcsCatalog.java:108)
        at 
org.apache.iceberg.dell.ecs.TestEcsCatalog.before(TestEcsCatalog.java:62)
   ```
        
   This was because `NoClassDefFoundError` was not handled in the catch block 
due to which metrics was not falling back to null metrics in case the exception 
happens while doing `metrics.initialize(properties)`. 
   
   Reference:
   
   
https://github.com/apache/iceberg/blob/7c2ea0128133f630041ecb77de1fae754073e904/aws/src/main/java/org/apache/iceberg/aws/s3/S3FileIO.java#L274-L283
   
   This PR handles the null metrics fallback for MetricsContext for the other 
FileIO's.
   
   ---
   cc: @rdblue @danielcweeks @kbendick 


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