You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/02/16 18:17:27 UTC

[GitHub] [iceberg] szehon-ho commented on a change in pull request #4126: Spark: Close executor services after action completes in Procedures

szehon-ho commented on a change in pull request #4126:
URL: https://github.com/apache/iceberg/pull/4126#discussion_r808319071



##########
File path: spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/procedures/BaseProcedure.java
##########
@@ -71,11 +77,21 @@ protected TableCatalog tableCatalog() {
   }
 
   protected <T> T modifyIcebergTable(Identifier ident, Function<org.apache.iceberg.Table, T> func) {
-    return execute(ident, true, func);
+    try {
+      T result = execute(ident, true, func);
+      return result;

Review comment:
       Optional, can it be on oneline as before:
   ```
   try {
       return execute(ident, true, func);
   } finally {
   ```

##########
File path: spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/procedures/BaseProcedure.java
##########
@@ -151,4 +167,27 @@ TableCatalog tableCatalog() {
       return tableCatalog;
     }
   }
+
+  /**
+   * Closes the procedure's executor service if a new one was created.

Review comment:
       Nit; maybe just but comment can be clearer?  (maybe method link?)
   
   Maybe put a comment on executorService() call and say we need to call this method, as thats the one that would be called first?




-- 
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-unsubscribe@iceberg.apache.org

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



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