[HUDI-571] Add "compactions show archived" command to CLI#1312
[HUDI-571] Add "compactions show archived" command to CLI#1312n3nash merged 1 commit intoapache:masterfrom
Conversation
|
@nbalajee can you review this ? Please ping here once you have approved this diff |
There was a problem hiding this comment.
Pass timeline containing commit + compaction actions only, instead of activeTimeline (which may have other actions)?
HoodieTimeline timeline = activeTimeline.getCommitsAndCompactionTimeline();
There was a problem hiding this comment.
@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.
There was a problem hiding this comment.
what does this comment mean ?
There was a problem hiding this comment.
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.
ad19526 to
258ac06
Compare
|
@n3nash I removed the comment. please take a look. |
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.