You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2023/01/11 02:49:24 UTC

[GitHub] [iceberg] stevenzwu commented on a diff in pull request #6407: Flink: use SerializableTable for source

stevenzwu commented on code in PR #6407:
URL: https://github.com/apache/iceberg/pull/6407#discussion_r1066526268


##########
flink/v1.16/flink/src/main/java/org/apache/iceberg/flink/source/FlinkInputFormat.java:
##########
@@ -79,15 +68,9 @@ public BaseStatistics getStatistics(BaseStatistics cachedStatistics) {
   @Override
   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, workerPool);
-    } finally {
-      workerPool.shutdown();
-    }
+    return FlinkSplitPlanner.planInputSplits(table, context, workerPool);

Review Comment:
   just to double check. input format is only for batch query, right? SerializableTable is read only and can't be used for long-running streaming source.



-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org