You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2023/01/08 03:20:11 UTC

[GitHub] [hudi] SteNicholas commented on a diff in pull request #7620: [HUDI-5511] Do not clean the CkpMetadata dir when restart the job

SteNicholas commented on code in PR #7620:
URL: https://github.com/apache/hudi/pull/7620#discussion_r1064075908


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/meta/CkpMetadata.java:
##########
@@ -92,13 +92,14 @@ public void close() {
   // -------------------------------------------------------------------------
 
   /**
-   * Initialize the message bus, would clean all the messages
+   * Initialize the message bus, would keep all the messages.
    *
    * <p>This expects to be called by the driver.
    */
   public void bootstrap() throws IOException {
-    fs.delete(path, true);
-    fs.mkdirs(path);
+    if (!fs.exists(path)) {

Review Comment:
   If a checkpoint succeed and the job crashes suddenly, meanwhile the JM restarts on another machine instance, the ckp metadata isn't keeped. This change only solves the scenario where JM is on the same machine. WDYT?



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