Skip to content

[HUDI-571] Add "compactions show archived" command to CLI#1312

Merged
n3nash merged 1 commit intoapache:masterfrom
satishkotha:sk/archall
Feb 14, 2020
Merged

[HUDI-571] Add "compactions show archived" command to CLI#1312
n3nash merged 1 commit intoapache:masterfrom
satishkotha:sk/archall

Conversation

@satishkotha
Copy link
Member

What is the purpose of the pull request

Add command to show archived compactions. This is useful for debugging historical timeline.

Brief change log

Follow up from #1274 to list all archived compactions.

Note that compactions are not being written to archive file, so this returns empty. If anyone have context why compactions are not being written to archive, let me know.

Verify this pull request

Manually verified the change by running CLI locally. Example output:
->compactions show all (verify that listing active timeline compactions work)
╔═════════════════════════╤═══════════╤═══════════════════════════════╗
║ Compaction Instant Time │ State │ Total FileIds to be Compacted ║
╠═════════════════════════╪═══════════╪═══════════════════════════════╣
║ 20200208002351 │ INFLIGHT │ 5968 ║
╟─────────────────────────┼───────────┼───────────────────────────────╢
║ 20200208002335 │ COMPLETED │ 65 ║
╟─────────────────────────┼───────────┼───────────────────────────────╢
║ 20200207235341 │ COMPLETED │ 84 ║
╟─────────────────────────┼───────────┼───────────────────────────────╢
║ 20200207231819 │ COMPLETED │ 84 ║
╟─────────────────────────┼───────────┼───────────────────────────────╢

->compactions show archived
╔═════════════════════════╤═══════╤═══════════════════════════════╗
║ Compaction Instant Time │ State │ Total FileIds to be Compacted ║
╠═════════════════════════╧═══════╧═══════════════════════════════╣
║ (empty) ║
╚═════════════════════════════════════════════════════════════════╝

Committer checklist

  • Has a corresponding JIRA in PR title & commit

  • Commit message is descriptive of the change

  • CI is green

  • Necessary doc changes done or have another open PR

  • For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.

@satishkotha satishkotha requested a review from n3nash February 8, 2020 01:03
@n3nash
Copy link
Contributor

n3nash commented Feb 11, 2020

@nbalajee can you review this ? Please ping here once you have approved this diff

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pass timeline containing commit + compaction actions only, instead of activeTimeline (which may have other actions)?

HoodieTimeline timeline = activeTimeline.getCommitsAndCompactionTimeline();

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nbalajee printAllCompactions only calls compcationPlanReader for commits and compactions. As part of refactor, timeline.getCommitsAndCompactionTimeline has been moved into printAllCompactions (to reuse between active/archive timelines). I just verified this works as expected even in presence of cleans.
Let me know if you think there is a better way to organize this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. LGTM.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this comment mean ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its no longer relevant. so removed it. I intially had two parameters: List and List. But that didnt seem good, so changed it to one parameter.

@satishkotha
Copy link
Member Author

@n3nash I removed the comment. please take a look.

Copy link
Contributor

@n3nash n3nash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@n3nash n3nash merged commit 20ed251 into apache:master Feb 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants