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 2021/11/24 18:42:31 UTC

[GitHub] [hudi] vinothchandar commented on a change in pull request #4091: [HUDI-2844][CLI] Fixing archived Timeline crashing if timeline contains REPLACE_COMMIT

vinothchandar commented on a change in pull request #4091:
URL: https://github.com/apache/hudi/pull/4091#discussion_r756343584



##########
File path: hudi-common/src/main/java/org/apache/hudi/common/table/timeline/HoodieArchivedTimeline.java
##########
@@ -173,8 +174,11 @@ private String getMetadataKey(String action) {
         return "hoodieSavePointMetadata";
       case HoodieTimeline.COMPACTION_ACTION:
         return "hoodieCompactionPlan";
+      case HoodieTimeline.REPLACE_COMMIT_ACTION:
+        return "hoodieReplaceCommitMetadata";
       default:
-        throw new HoodieIOException("Unknown action in metadata " + action);
+        LOG.error(String.format("Unknown action in metadata (%s)", action));
+        return null;

Review comment:
       Can we return an Option instead of null

##########
File path: hudi-common/src/main/java/org/apache/hudi/common/table/timeline/HoodieArchivedTimeline.java
##########
@@ -173,8 +174,11 @@ private String getMetadataKey(String action) {
         return "hoodieSavePointMetadata";
       case HoodieTimeline.COMPACTION_ACTION:
         return "hoodieCompactionPlan";
+      case HoodieTimeline.REPLACE_COMMIT_ACTION:
+        return "hoodieReplaceCommitMetadata";

Review comment:
       yeah adding an `insert_overwrite` operation would also generate a replacecommit. don't even need clustering




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