You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "rbalamohan (via GitHub)" <gi...@apache.org> on 2023/05/09 02:41:09 UTC

[GitHub] [hive] rbalamohan commented on a diff in pull request #4302: HIVE-27325: Expiring old snapshots deletes files with DirectExecutorService causing runtime delays.

rbalamohan commented on code in PR #4302:
URL: https://github.com/apache/hive/pull/4302#discussion_r1188058912


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java:
##########
@@ -676,6 +688,15 @@ public void executeOperation(org.apache.hadoop.hive.ql.metadata.Table hmsTable,
     }
   }
 
+  private static ExecutorService getDeleteExecutorService(String completeName, int numThreads) {
+    AtomicInteger deleteThreadsIndex = new AtomicInteger(0);
+    return Executors.newFixedThreadPool(numThreads, runnable -> {

Review Comment:
   Iceberg API may not take care of TP lifecycle. Do you need to take care of shutting down TP in finally block after expire snapshots? Otherwise it will end up creating too may TP depending on number of executions.



-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org