rdsr commented on a change in pull request #45: Lazily submit tasks in ParallelIterable and add cancellation. URL: https://github.com/apache/incubator-iceberg/pull/45#discussion_r240886393
########## File path: core/src/main/java/com/netflix/iceberg/util/ThreadPools.java ########## @@ -27,42 +27,21 @@ import java.util.concurrent.ThreadPoolExecutor; public class ThreadPools { - public static final String PLANNER_THREAD_POOL_SIZE_PROP = - SystemProperties.PLANNER_THREAD_POOL_SIZE_PROP; public static final String WORKER_THREAD_POOL_SIZE_PROP = SystemProperties.WORKER_THREAD_POOL_SIZE_PROP; - private static ExecutorService PLANNER_POOL = MoreExecutors.getExitingExecutorService( - (ThreadPoolExecutor) Executors.newFixedThreadPool( - getPoolSize(PLANNER_THREAD_POOL_SIZE_PROP, 4), - new ThreadFactoryBuilder() - .setDaemon(true) - .setNameFormat("iceberg-planner-pool-%d") - .build())); + public static final int WORKER_THREAD_POOL_SIZE = getPoolSize( + WORKER_THREAD_POOL_SIZE_PROP, + Runtime.getRuntime().availableProcessors()); private static ExecutorService WORKER_POOL = MoreExecutors.getExitingExecutorService( (ThreadPoolExecutor) Executors.newFixedThreadPool( - getPoolSize(WORKER_THREAD_POOL_SIZE_PROP, Runtime.getRuntime().availableProcessors()), + WORKER_THREAD_POOL_SIZE, new ThreadFactoryBuilder() .setDaemon(true) Review comment: nit: I think `MoreExecutors.getExitingExecutorService ` already creates daemon threads ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services