Skip to content

[WIP] feat(index): Add Indexer abstraction and refactor metadata table init…#18348

Open
cshuo wants to merge 1 commit intoapache:masterfrom
cshuo:indexer_abstraction
Open

[WIP] feat(index): Add Indexer abstraction and refactor metadata table init…#18348
cshuo wants to merge 1 commit intoapache:masterfrom
cshuo:indexer_abstraction

Conversation

@cshuo
Copy link
Collaborator

@cshuo cshuo commented Mar 19, 2026

…ialization logic

Describe the issue this Pull Request addresses

This pr is based on #12983

Summary and Changelog

Impact

Risk Level

Documentation Update

Contributor's checklist

  • Read through contributor's guide
  • Enough context is provided in the sections above
  • Adequate tests were added if applicable

* including file-group initialization, commit, and partition state update.
*/
@Slf4j
public abstract class BaseIndexer implements Indexer {
Copy link
Contributor

Choose a reason for hiding this comment

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

To break the PR down, could we first add these abstraction classes to ease the reviews?

@cshuo cshuo force-pushed the indexer_abstraction branch from d2b4e7e to 116a487 Compare March 19, 2026 03:50
@github-actions github-actions bot added the size:XL PR with lines of changes > 1000 label Mar 19, 2026
@cshuo cshuo force-pushed the indexer_abstraction branch from 6a88e61 to 42e6f52 Compare March 19, 2026 12:31
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 85.23985% with 80 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.36%. Comparing base (14a549f) to head (42e6f52).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
.../hudi/metadata/index/record/BaseRecordIndexer.java 70.70% 25 Missing and 4 partials ⚠️
...va/org/apache/hudi/metadata/index/BaseIndexer.java 90.27% 2 Missing and 5 partials ⚠️
...n/java/org/apache/hudi/metadata/index/Indexer.java 0.00% 7 Missing ⚠️
...i/metadata/index/expression/ExpressionIndexer.java 83.33% 3 Missing and 3 partials ⚠️
...ta/index/partitionstats/PartitionStatsIndexer.java 64.70% 4 Missing and 2 partials ⚠️
...org/apache/hudi/metadata/index/IndexerFactory.java 76.19% 3 Missing and 2 partials ⚠️
...dex/UnsupportedExpressionIndexRecordGenerator.java 42.85% 4 Missing ⚠️
...etadata/index/record/PartitionedRecordIndexer.java 89.18% 2 Missing and 2 partials ⚠️
...udi/metadata/index/secondary/SecondaryIndexer.java 86.36% 1 Missing and 2 partials ⚠️
...ata/index/SparkExpressionIndexRecordGenerator.java 80.00% 2 Missing and 1 partial ⚠️
... and 4 more
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #18348      +/-   ##
============================================
- Coverage     68.48%   68.36%   -0.12%     
- Complexity    27362    27452      +90     
============================================
  Files          2420     2443      +23     
  Lines        132127   132610     +483     
  Branches      15909    15980      +71     
============================================
+ Hits          90491    90664     +173     
- Misses        34627    34910     +283     
- Partials       7009     7036      +27     
Flag Coverage Δ
common-and-other-modules 44.28% <39.11%> (-0.09%) ⬇️
hadoop-mr-java-client 45.17% <57.61%> (+0.05%) ⬆️
spark-client-hadoop-common 48.29% <48.42%> (-0.05%) ⬇️
spark-java-tests 48.84% <74.25%> (-0.08%) ⬇️
spark-scala-tests 45.00% <69.81%> (-0.12%) ⬇️
utilities 38.62% <69.62%> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...oodieBackedTableMetadataWriterTableVersionSix.java 76.41% <100.00%> (+0.73%) ⬆️
...apache/hudi/metadata/HoodieMetadataWriteUtils.java 83.49% <100.00%> (+0.90%) ⬆️
.../metadata/SecondaryIndexRecordGenerationUtils.java 88.27% <100.00%> (ø)
...tadata/index/bloomfilters/BloomFiltersIndexer.java 100.00% <100.00%> (ø)
...ache/hudi/metadata/index/record/RecordIndexer.java 100.00% <100.00%> (ø)
...metadata/FlinkHoodieBackedTableMetadataWriter.java 85.71% <100.00%> (-0.34%) ⬇️
.../metadata/JavaHoodieBackedTableMetadataWriter.java 85.18% <100.00%> (-0.53%) ⬇️
...he/hudi/client/utils/SparkMetadataWriterUtils.java 84.91% <100.00%> (-0.09%) ⬇️
...metadata/SparkHoodieBackedTableMetadataWriter.java 80.00% <100.00%> (-3.91%) ⬇️
...oodieBackedTableMetadataWriterTableVersionSix.java 43.75% <100.00%> (-3.19%) ⬇️
... and 22 more

... and 33 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL PR with lines of changes > 1000

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants