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 2022/03/21 13:16:59 UTC

[GitHub] [hudi] dongkelun commented on a change in pull request #4016: [HUDI-2675] Fix the exception 'Not an Avro data file' when archive and clean

dongkelun commented on a change in pull request #4016:
URL: https://github.com/apache/hudi/pull/4016#discussion_r831093898



##########
File path: hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/HoodieTimelineArchiveLog.java
##########
@@ -321,10 +321,19 @@ public void archive(HoodieEngineContext context, List<HoodieInstant> instants) t
       List<IndexedRecord> records = new ArrayList<>();
       for (HoodieInstant hoodieInstant : instants) {
         try {
-          deleteAnyLeftOverMarkers(context, hoodieInstant);
-          records.add(convertToAvroRecord(hoodieInstant));
-          if (records.size() >= this.config.getCommitArchivalBatchSize()) {
-            writeToFile(wrapperSchema, records);
+          if (table.getActiveTimeline().isEmpty(hoodieInstant)
+                  && (
+                          hoodieInstant.getAction().equals(HoodieTimeline.CLEAN_ACTION)
+                          || (hoodieInstant.getAction().equals(HoodieTimeline.ROLLBACK_ACTION) && hoodieInstant.isCompleted())
+                     )

Review comment:
       HDFS




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