rdblue commented on a change in pull request #2800:
URL: https://github.com/apache/iceberg/pull/2800#discussion_r667554624



##########
File path: spark2/src/main/java/org/apache/iceberg/spark/source/Reader.java
##########
@@ -95,6 +104,7 @@
   private Filter[] pushedFilters = NO_FILTERS;
   private final boolean localityPreferred;
   private final int batchSize;
+  private ExecutorService readTasksInitExecutorService = 
DEFAULT_READTASKS_INIT_EXECUTOR_SERVICE;

Review comment:
       I don't think that there is a need for this field and I'd prefer not to 
add mutable state. Can you refactor this to call 
`executeWith(ThreadPools.getWorkerPool())`  instead? You can pass `null` to 
that method so it can also check `localityPreferred` inline:
   
   ```
       .executeWith(localityPreferred ? ThreadPools.getWorkerPool() : null)
   ```




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