vinothchandar commented on code in PR #13216:
URL: https://github.com/apache/hudi/pull/13216#discussion_r2177850535


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/source/stats/FileStatsIndex.java:
##########
@@ -103,17 +105,22 @@ public String getIndexPartitionName() {
   public HoodieTableMetadata getMetadataTable() {
     // initialize the metadata table lazily
     if (this.metadataTable == null) {
-      HoodieHadoopStorage storage = new HoodieHadoopStorage(basePath, 
FlinkClientUtil.getHadoopConf());
-      HoodieTableMetaClient metaClient = 
HoodieTableMetaClient.builder().setBasePath(basePath).setConf(storage.getConf()).build();
+      initMetaClient();
       this.metadataTable = 
metaClient.getTableFormat().getMetadataFactory().create(
           HoodieFlinkEngineContext.DEFAULT,
-          storage,
-          metadataConfig,
+          metaClient.getStorage(),
+          StreamerUtil.metadataConfig(conf),
           basePath);
     }
     return this.metadataTable;
   }
 
+  private void initMetaClient() {
+    if (this.metaClient == null) {
+      this.metaClient = StreamerUtil.createMetaClient(conf);

Review Comment:
   @danny0405 general question for you. is `StreamerUtil` the right place for 
such reusable helper methods



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

Reply via email to