You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "danny0405 (via GitHub)" <gi...@apache.org> on 2023/04/01 03:43:25 UTC

[GitHub] [hudi] danny0405 commented on a diff in pull request #8338: [HUDI-5996] Verify the consistency of bucket num at job sta…

danny0405 commented on code in PR #8338:
URL: https://github.com/apache/hudi/pull/8338#discussion_r1155050876


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/util/StreamerUtil.java:
##########
@@ -217,18 +218,52 @@ public static HoodieTableMetaClient initTableIfNotExists(
           .setCDCEnabled(conf.getBoolean(FlinkOptions.CDC_ENABLED))
           .setCDCSupplementalLoggingMode(conf.getString(FlinkOptions.SUPPLEMENTAL_LOGGING_MODE))
           .setTimelineLayoutVersion(1)
+          .setHoodieIndexConf(OptionsResolver.getHoodieIndexConf(conf))
           .initTable(hadoopConf, basePath);
       LOG.info("Table initialized under base path {}", basePath);
       return metaClient;
     } else {
       LOG.info("Table [{}/{}] already exists, no need to initialize the table",
           basePath, conf.getString(FlinkOptions.TABLE_NAME));
-      return StreamerUtil.createMetaClient(basePath, hadoopConf);
+      HoodieTableMetaClient client = StreamerUtil.createMetaClient(basePath, hadoopConf);
+      validateTableConfig(conf, client.getTableConfig());

Review Comment:
   Did you notice that the tabe can only be initialized only once?



-- 
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: commits-unsubscribe@hudi.apache.org

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