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


##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/streamer/StreamSync.java:
##########
@@ -333,29 +333,35 @@ public StreamSync(HoodieStreamer.Config cfg, SparkSession 
sparkSession,
   }
 
   /**
-   * Refresh Timeline.
+   * Creates a meta client for the table. If the table does not yet exist, it 
will be initialized.
    *
+   * @param refreshTimeline when set to true, loads the active timeline and 
updates the {@link #commitsTimelineOpt} and {@link #allCommitsTimelineOpt} 
values
+   * @return a meta client for the table
    * @throws IOException in case of any IOException
    */
-  public void refreshTimeline() throws IOException {
+  public HoodieTableMetaClient initializeMetaClient(boolean refreshTimeline) 
throws IOException {
     if (storage.exists(new StoragePath(cfg.targetBasePath))) {
       try {
         HoodieTableMetaClient meta = HoodieTableMetaClient.builder()
             .setConf(HadoopFSUtils.getStorageConfWithCopy(conf))
             .setBasePath(cfg.targetBasePath)
             .setPayloadClassName(cfg.payloadClassName)
             .setRecordMergerStrategy(null)
+            
.setTimeGeneratorConfig(HoodieTimeGeneratorConfig.newBuilder().fromProperties(props).withPath(cfg.targetBasePath).build())

Review Comment:
   Nice catch~



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