-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HUDI-757] Added hudi-cli command to export metadata of Instants. #1476
Conversation
hudi-cli/src/main/java/org/apache/hudi/cli/commands/ExportCommand.java
Outdated
Show resolved
Hide resolved
hudi-cli/src/main/java/org/apache/hudi/cli/commands/ExportCommand.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left 1 comment, rest looks fine to me @prashantwason
I have addressed all you review comments. |
Currently the export writes out binary avro records for instants read from the metadata archive files. This beats the purpose of exporting for debugging. I am updating the code to write out json formatted records instead for all exported instants. |
63d8c1f
to
1405db4
Compare
Updated to write out instant metadata in json format so its easy to use CLI tools. Tested using a few HUDI datasets and works good. |
CI actually passed.. when I click on the link.. may be kick the job again by making an empty commit/amend |
7279117
to
0e94b76
Compare
Fixed the merge conflict and pushed again. |
hudi-cli/src/main/java/org/apache/hudi/cli/commands/ExportCommand.java
Outdated
Show resolved
Hide resolved
hudi-cli/src/main/java/org/apache/hudi/cli/commands/ExportCommand.java
Outdated
Show resolved
Hide resolved
Example: hudi:db.table-> export instants --localFolder /tmp/ --limit 5 --actions clean,rollback,commit --desc false
LGTM |
What is the purpose of the pull request
Added hudi-cli command to export metadata of Instants.
Brief change log
Added a new command to hudi-cli
Verify this pull request
This change can be verified by running hudi-cli, connecting to a HUDI table and running the following command:
hudi:db.table-> export instants --localFolder /tmp/dump --limit 5 --actions clean,rollback,commit --desc false
After this, 5 instant files should have been created in the /tmp/dump folder.
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.