danny0405 commented on a change in pull request #4000:
URL: https://github.com/apache/hudi/pull/4000#discussion_r816515465



##########
File path: 
hudi-flink/src/main/java/org/apache/hudi/sink/compact/CompactFunction.java
##########
@@ -114,6 +117,17 @@ private void doCompaction(String instantTime, 
CompactionOperation compactionOper
     collector.collect(new CompactionCommitEvent(instantTime, 
compactionOperation.getFileId(), writeStatuses, taskID));
   }
 
+  private void refresh() throws Exception {
+    HoodieTableMetaClient metaClient = 
writeClient.getHoodieTable().getMetaClient();
+    metaClient.reloadActiveTimeline();
+
+    // set table schema
+    CompactionUtil.setAvroSchema(conf, metaClient);
+
+    // refresh writeClient
+    writeClient = StreamerUtil.createWriteClient(conf, getRuntimeContext());
+  }

Review comment:
       I guess writeConfig.setSchema should work, so no need to rebuild it ~




-- 
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-unsubscr...@hudi.apache.org

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


Reply via email to