chenshzh commented on code in PR #7017:
URL: https://github.com/apache/hudi/pull/7017#discussion_r1006389908
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/HoodieTableSource.java:
##########
@@ -162,7 +163,7 @@ public HoodieTableSource(
this.limit = limit == null ? NO_LIMIT_CONSTANT : limit;
this.filters = filters == null ? Collections.emptyList() : filters;
this.hadoopConf = HadoopConfigurations.getHadoopConf(conf);
- this.metaClient = StreamerUtil.metaClientForReader(conf, hadoopConf);
+ this.metaClient =
Optional.ofNullable(metaClient).orElse(StreamerUtil.metaClientForReader(conf,
hadoopConf));
Review Comment:
> initialization lazy
Here we have some more consideration:
During planned and optimized **metaclient** or **fileindex** might be used
by different rules' **hoodie source** copy instances for multi times.
For example, actually **fileindex** is used in
**PushPartitionIntoTableSourceScanRule** and
**PushFilterIntoSourceScanRuleBase**
So it seems that initialization lazy will also cause the multi construction ?
--
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]