hudi-cli: metadata stats always prints an empty table
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- java, spark
- Domain
- cli, data-engineering
Research direction
Start at MetadataCommand.java:192-194 and inspect MetadataCommand.stats, then follow HoodieBackedTableMetadata.stats() to understand why the opened metadata table returns no metrics. Reproduce with a metadata-enabled table and metadata stats, then update the behavior and the test referenced in #19877 so the command reports the intended stats or confirms their removal.
Written by the indexing model from the issue text.
Description
Bug Description
What happened:
metadata stats in hudi-cli always prints an empty table. MetadataCommand.stats (master 6ac27904, MetadataCommand.java:192-194) opens the metadata table with HoodieMetadataConfig.newBuilder().enable(true).build() and no metrics configuration, so HoodieBackedTableMetadata.stats() returns an empty map and the loop that renders the rows never runs.
What you expected:
The command reports the metadata table stats it was written to show (partition count, file count, sizes), or it is removed if the stats are no longer produced.
Steps to reproduce:
- Write a table with the metadata table enabled.
connect --path <table>thenmetadata stats.- Only the header row is printed.
Found while writing the tests in #19877; the test there asserts the empty table as the current behaviour.
Environment
Hudi version: master (6ac27904)
Query engine: hudi-cli (Spark)
Relevant configs: none
Logs and Stack Trace
No exception; the rendered table has a header and no rows.
- Dominant language
- Java
- Stars
- 6.3k
- Forks
- 2.5k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 111
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/hudi
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
CompactionAdminClient.unscheduleCompactionFileId drops every other operation in the same partition Opentype:bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
area:ci priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
area:ci priority:high
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100