huyuanfeng2018 commented on code in PR #9353:
URL: https://github.com/apache/iceberg/pull/9353#discussion_r1440003882


##########
aws/src/main/java/org/apache/iceberg/aws/dynamodb/DynamoDbCatalog.java:
##########
@@ -487,6 +486,7 @@ public Configuration getConf() {
 
   @Override
   public void close() throws IOException {
+    super.close();

Review Comment:
   > I think in order to close metric reporter when cloase the catalog, it can 
also be implemented to add `super.metricsReporter()` to closeableGroup on line 
143, but this require to change the `BaseMetastoreCatalog.metricsReporter()` 
method from private to protected.
   > 
   > This approach keep the `Closeable` in concrete class instead of abstract 
base class, and it seem to be more aligned with how other closable are handled 
in the this class.
   
   I agree with this statement. In the Java language, it is generally a common 
practice to call super.close() when a subclass overrides the method of the 
parent class, so I did do this at the beginning. If want to unify for the 
`closable` approach, it is indeed better to use `closeableGroup`. I will modify 
this part of the code.
   
   
   
   



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