svalaskevicius commented on code in PR #15312:
URL: https://github.com/apache/iceberg/pull/15312#discussion_r3118118216


##########
aws/src/main/java/org/apache/iceberg/aws/s3/S3OutputStream.java:
##########
@@ -112,14 +109,8 @@ class S3OutputStream extends PositionOutputStream {
       synchronized (S3OutputStream.class) {
         if (executorService == null) {
           executorService =
-              MoreExecutors.getExitingExecutorService(
-                  (ThreadPoolExecutor)
-                      Executors.newFixedThreadPool(
-                          s3FileIOProperties.multipartUploadThreads(),
-                          new ThreadFactoryBuilder()
-                              .setDaemon(true)
-                              .setNameFormat("iceberg-s3fileio-upload-%d")
-                              .build()));
+              ThreadPools.newExitingWorkerPool(

Review Comment:
   I was about to reply that this is the only place I found - but in fact this 
is the only place that had been stopped by `MoreExecutors` while I was testing 
it (my application still required it to continue until our own shutdown hook 
was invoked so it could stop gracefully)
   
   the other places are these:
   ```
    rg getExitingExecutorService | grep -v 'src/test' | grep -v 
'src/integration'
   
spark/v4.1/spark/src/main/java/org/apache/iceberg/spark/procedures/BaseProcedure.java:
        MoreExecutors.getExitingExecutorService(
   
spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/procedures/BaseProcedure.java:
        MoreExecutors.getExitingExecutorService(
   
spark/v4.1/spark/src/main/java/org/apache/iceberg/spark/actions/RewriteDataFilesSparkAction.java:
    return MoreExecutors.getExitingExecutorService(
   
spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/actions/RewriteDataFilesSparkAction.java:
    return MoreExecutors.getExitingExecutorService(
   
spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/actions/RewritePositionDeleteFilesSparkAction.java:
    return MoreExecutors.getExitingExecutorService(
   
spark/v4.1/spark/src/main/java/org/apache/iceberg/spark/actions/RewritePositionDeleteFilesSparkAction.java:
    return MoreExecutors.getExitingExecutorService(
   
spark/v3.4/spark/src/main/java/org/apache/iceberg/spark/procedures/BaseProcedure.java:
        MoreExecutors.getExitingExecutorService(
   
spark/v3.4/spark/src/main/java/org/apache/iceberg/spark/actions/RewriteDataFilesSparkAction.java:
    return MoreExecutors.getExitingExecutorService(
   
spark/v3.4/spark/src/main/java/org/apache/iceberg/spark/actions/RewritePositionDeleteFilesSparkAction.java:
    return MoreExecutors.getExitingExecutorService(
   
spark/v4.0/spark/src/main/java/org/apache/iceberg/spark/procedures/BaseProcedure.java:
        MoreExecutors.getExitingExecutorService(
   
spark/v4.0/spark/src/main/java/org/apache/iceberg/spark/actions/RewriteDataFilesSparkAction.java:
    return MoreExecutors.getExitingExecutorService(
   
spark/v4.0/spark/src/main/java/org/apache/iceberg/spark/actions/RewritePositionDeleteFilesSparkAction.java:
    return MoreExecutors.getExitingExecutorService(
   ```
   
   I'm not running spark so I cannot test them. Any preferences/suggestions?



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