You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "xushiyan (via GitHub)" <gi...@apache.org> on 2023/04/01 05:16:07 UTC

[GitHub] [hudi] xushiyan opened a new pull request, #8345: Hudi 6011 fix cli archive

xushiyan opened a new pull request, #8345:
URL: https://github.com/apache/hudi/pull/8345

   ### Change Logs
   
   - Make `show archived commits` handle replacecommit.
   - Make sure `--limit` default to 10 to avoid too many output
   
   ### Impact
   
   NA
   
   ### Risk level
   
   Low
   
   ### Documentation Update
   
   NA
   
   ### Contributor's checklist
   
   - [ ] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [ ] Change Logs and Impact were stated clearly
   - [ ] Adequate tests were added if applicable
   - [ ] CI passed
   


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


[GitHub] [hudi] yihua merged pull request #8345: [HUDI-6011] Fix cli show archived commits breaks for replacecommit

Posted by "yihua (via GitHub)" <gi...@apache.org>.
yihua merged PR #8345:
URL: https://github.com/apache/hudi/pull/8345


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


[GitHub] [hudi] hudi-bot commented on pull request #8345: [HUDI-6011] Fix cli show archived commits breaks for replacecommit

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #8345:
URL: https://github.com/apache/hudi/pull/8345#issuecomment-1492841799

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "ff23f8bdae6dc5eac49789350c1d2a79c3538949",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "ff23f8bdae6dc5eac49789350c1d2a79c3538949",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * ff23f8bdae6dc5eac49789350c1d2a79c3538949 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


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


[GitHub] [hudi] hudi-bot commented on pull request #8345: [HUDI-6011] Fix cli show archived commits breaks for replacecommit

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #8345:
URL: https://github.com/apache/hudi/pull/8345#issuecomment-1492919336

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "ff23f8bdae6dc5eac49789350c1d2a79c3538949",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16040",
       "triggerID" : "ff23f8bdae6dc5eac49789350c1d2a79c3538949",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * ff23f8bdae6dc5eac49789350c1d2a79c3538949 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16040) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


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


[GitHub] [hudi] hudi-bot commented on pull request #8345: [HUDI-6011] Fix cli show archived commits breaks for replacecommit

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #8345:
URL: https://github.com/apache/hudi/pull/8345#issuecomment-1492842895

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "ff23f8bdae6dc5eac49789350c1d2a79c3538949",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16040",
       "triggerID" : "ff23f8bdae6dc5eac49789350c1d2a79c3538949",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * ff23f8bdae6dc5eac49789350c1d2a79c3538949 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16040) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


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


[GitHub] [hudi] nsivabalan commented on a diff in pull request #8345: [HUDI-6011] Fix cli show archived commits breaks for replacecommit

Posted by "nsivabalan (via GitHub)" <gi...@apache.org>.
nsivabalan commented on code in PR #8345:
URL: https://github.com/apache/hudi/pull/8345#discussion_r1155542372


##########
hudi-cli/src/main/java/org/apache/hudi/cli/commands/ArchivedCommitsCommand.java:
##########
@@ -225,26 +225,24 @@ private Comparable[] commitDetail(GenericRecord record, String metadataName,
   }
 
   private Comparable[] readCommit(GenericRecord record, boolean skipMetadata) {
-    try {
-      switch (record.get("actionType").toString()) {
-        case HoodieTimeline.CLEAN_ACTION:
-          return commitDetail(record, "hoodieCleanMetadata", skipMetadata);
-        case HoodieTimeline.COMMIT_ACTION:
-        case HoodieTimeline.DELTA_COMMIT_ACTION:
-          return commitDetail(record, "hoodieCommitMetadata", skipMetadata);
-        case HoodieTimeline.ROLLBACK_ACTION:
-          return commitDetail(record, "hoodieRollbackMetadata", skipMetadata);
-        case HoodieTimeline.SAVEPOINT_ACTION:
-          return commitDetail(record, "hoodieSavePointMetadata", skipMetadata);
-        case HoodieTimeline.COMPACTION_ACTION:
-          return commitDetail(record, "hoodieCompactionMetadata", skipMetadata);
-        default: {
-          return new Comparable[] {};
-        }
+    String actionType = record.get("actionType").toString();
+    switch (actionType) {
+      case HoodieTimeline.CLEAN_ACTION:
+        return commitDetail(record, "hoodieCleanMetadata", skipMetadata);
+      case HoodieTimeline.COMMIT_ACTION:
+      case HoodieTimeline.DELTA_COMMIT_ACTION:
+        return commitDetail(record, "hoodieCommitMetadata", skipMetadata);
+      case HoodieTimeline.ROLLBACK_ACTION:
+        return commitDetail(record, "hoodieRollbackMetadata", skipMetadata);
+      case HoodieTimeline.SAVEPOINT_ACTION:
+        return commitDetail(record, "hoodieSavePointMetadata", skipMetadata);
+      case HoodieTimeline.COMPACTION_ACTION:
+        return commitDetail(record, "hoodieCompactionMetadata", skipMetadata);
+      case HoodieTimeline.REPLACE_COMMIT_ACTION:
+        return commitDetail(record, "hoodieReplaceCommitMetadata", skipMetadata);
+      default: {

Review Comment:
   how about restore, log compaction, indexing actions? 



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


[GitHub] [hudi] yihua commented on a diff in pull request #8345: [HUDI-6011] Fix cli show archived commits breaks for replacecommit

Posted by "yihua (via GitHub)" <gi...@apache.org>.
yihua commented on code in PR #8345:
URL: https://github.com/apache/hudi/pull/8345#discussion_r1335092995


##########
hudi-cli/src/main/java/org/apache/hudi/cli/commands/ArchivedCommitsCommand.java:
##########
@@ -225,26 +225,24 @@ private Comparable[] commitDetail(GenericRecord record, String metadataName,
   }
 
   private Comparable[] readCommit(GenericRecord record, boolean skipMetadata) {
-    try {
-      switch (record.get("actionType").toString()) {
-        case HoodieTimeline.CLEAN_ACTION:
-          return commitDetail(record, "hoodieCleanMetadata", skipMetadata);
-        case HoodieTimeline.COMMIT_ACTION:
-        case HoodieTimeline.DELTA_COMMIT_ACTION:
-          return commitDetail(record, "hoodieCommitMetadata", skipMetadata);
-        case HoodieTimeline.ROLLBACK_ACTION:
-          return commitDetail(record, "hoodieRollbackMetadata", skipMetadata);
-        case HoodieTimeline.SAVEPOINT_ACTION:
-          return commitDetail(record, "hoodieSavePointMetadata", skipMetadata);
-        case HoodieTimeline.COMPACTION_ACTION:
-          return commitDetail(record, "hoodieCompactionMetadata", skipMetadata);
-        default: {
-          return new Comparable[] {};
-        }
+    String actionType = record.get("actionType").toString();
+    switch (actionType) {
+      case HoodieTimeline.CLEAN_ACTION:
+        return commitDetail(record, "hoodieCleanMetadata", skipMetadata);
+      case HoodieTimeline.COMMIT_ACTION:
+      case HoodieTimeline.DELTA_COMMIT_ACTION:
+        return commitDetail(record, "hoodieCommitMetadata", skipMetadata);
+      case HoodieTimeline.ROLLBACK_ACTION:
+        return commitDetail(record, "hoodieRollbackMetadata", skipMetadata);
+      case HoodieTimeline.SAVEPOINT_ACTION:
+        return commitDetail(record, "hoodieSavePointMetadata", skipMetadata);
+      case HoodieTimeline.COMPACTION_ACTION:
+        return commitDetail(record, "hoodieCompactionMetadata", skipMetadata);
+      case HoodieTimeline.REPLACE_COMMIT_ACTION:
+        return commitDetail(record, "hoodieReplaceCommitMetadata", skipMetadata);
+      default: {

Review Comment:
   These can be fixed in a separate PR if needed.  Clustering and replace commits are more commonly used than others.



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