yittg commented on a change in pull request #4177:
URL: https://github.com/apache/iceberg/pull/4177#discussion_r824496501
##########
File path:
flink/v1.14/flink/src/main/java/org/apache/iceberg/flink/source/FlinkInputFormat.java
##########
@@ -76,9 +78,12 @@ public BaseStatistics getStatistics(BaseStatistics
cachedStatistics) {
public FlinkInputSplit[] createInputSplits(int minNumSplits) throws
IOException {
// Called in Job manager, so it is OK to load table from catalog.
tableLoader.open();
+ final ExecutorService workerPool =
ThreadPools.newWorkerPool("iceberg-plan-worker-pool",
context.planParallelism());
try (TableLoader loader = tableLoader) {
Table table = loader.loadTable();
- return FlinkSplitPlanner.planInputSplits(table, context);
+ return FlinkSplitPlanner.planInputSplits(table, context, workerPool);
+ } finally {
+ workerPool.shutdown();
Review comment:
This function is called in client and job manager. So there is no
context here. Given it's a adhoc pool and will be shut down after planning, i
think it's ok to name it in this way.
--
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]