Skip to content
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-571] CLI - add option to print additional commit metadata #1318

Merged
merged 1 commit into from Feb 12, 2020

Conversation

satishkotha
Copy link
Member

What is the purpose of the pull request

Following up from debugging session last week to print additional metadata for commits. Additional metadata includes partition paths, fileIds, sizes etc

Note that this is added for both active and archived commits. The command line flag added (--includeExtraMetadata is similar to what we used for compactions)

Brief change log

Add includeExtraMetadata for CLI commands to list commits

Verify this pull request

->commits show --includeExtraMetadata true
╔═════════════╤════════════════╤════════════╤══════════════════════════════════════╤════════════════╤════════════╤═════════════╤═════════════╤═══════════════════╤════════════════════╤══════════════════╤══════════════════════════╤═══════════════════════╤═══════════════════╤═════════════════════════════════╤═══════════════════╗
║ action │ instant │ partition │ file_id │ prev_instant │ num_writes │ num_inserts │ num_deletes │ num_update_writes │ total_write_errors │ total_log_blocks │ total_corrupt_log_blocks │ total_rollback_blocks │ total_log_records │ total_updated_records_compacted │ total_write_bytes ║
╠═════════════╪════════════════╪════════════╪══════════════════════════════════════╪════════════════╪════════════╪═════════════╪═════════════╪═══════════════════╪════════════════════╪══════════════════╪══════════════════════════╪═══════════════════════╪═══════════════════╪═════════════════════════════════╪═══════════════════╣
║ deltacommit │ 20200210180215 │ null │ da59f86c-c1ac-4f32-bce7-f97b6a3fb35e │ 20200210010321 │ 2 │ 0 │ 0 │ 0 │ 0 │ 0 │ 0 │ 0 │ 0 │ 0 │ 28128 ║
╟─────────────┼────────────────┼────────────┼──────────────────────────────────────┼────────────────┼────────────┼─────────────┼─────────────┼───────────────────┼────────────────────┼──────────────────┼──────────────────────────┼───────────────────────┼───────────────────┼─────────────────────────────────┼────────

->commits show
║ CommitTime │ Total Bytes Written │ Total Files Added │ Total Files Updated │ Total Partitions Written │ Total Records Written │ Total Update Records Written │ Total Errors ║
╠════════════════╪═════════════════════╪═══════════════════╪═════════════════════╪══════════════════════════╪═══════════════════════╪══════════════════════════════╪══════════════╣
║ 20200210180215 │ 886.8 MB │ 0 │ 1681 │ 276 │ 1535368 │ 18183 │ 0 ║
╟────────────────┼─────────────────────┼───────────────────┼─────────────────────┼──────────────────────────┼───────────────────────┼──────────────────────────────┼──────────────╢

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.


TableHeader header = new TableHeader().addTableHeaderField("action").addTableHeaderField("instant")
.addTableHeaderField("partition").addTableHeaderField("file_id").addTableHeaderField("prev_instant")
.addTableHeaderField("num_writes").addTableHeaderField("num_inserts").addTableHeaderField("num_deletes")
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we add names in snake_case in other header commands ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point. converted to camel case to be consistent

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.

@satishkotha one comment

@satishkotha
Copy link
Member Author

@n3nash addressed comments. Please take a look.

@n3nash n3nash self-requested a review February 12, 2020 22:11
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 63b4216 into apache:master Feb 12, 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.

None yet

2 participants