Skip to content

fix(core): use correct clustering action for 0.x vs 1.x in BaseHoodieTableServiceClient#18942

Open
rahil-c wants to merge 1 commit into
apache:masterfrom
rahil-c:rahil/hudi-clustering
Open

fix(core): use correct clustering action for 0.x vs 1.x in BaseHoodieTableServiceClient#18942
rahil-c wants to merge 1 commit into
apache:masterfrom
rahil-c:rahil/hudi-clustering

Conversation

@rahil-c

@rahil-c rahil-c commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

…TableServiceClient

Describe the issue this Pull Request addresses

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

@rahil-c rahil-c requested review from nsivabalan and yihua June 8, 2026 23:57

@hudi-agent hudi-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤖 This review was generated by an AI agent and may contain mistakes. Please verify any suggestions before applying.

Thanks for the fix! This correctly switches completeClustering in both the base and Flink table service clients to use the actual action from the clustering instant (so metrics land under clustering.* for 1.x tables and replacecommit.* for legacy 0.x tables) instead of always hardcoding CLUSTERING_ACTION. clusteringInstant is resolved earlier in each method with .get(), so it's safe to read its action here, and the new test covers both action paths. No issues flagged from this automated pass — a Hudi committer or PMC member can take it from here for a final review.

cc @yihua

@github-actions github-actions Bot added the size:S PR with lines of changes in (10, 100] label Jun 9, 2026
@rahil-c rahil-c changed the title fix(core): use correct clustering action for 0.x vs 1.x in BaseHoodie… fix(core): use correct clustering action for 0.x vs 1.x Jun 9, 2026
@rahil-c rahil-c changed the title fix(core): use correct clustering action for 0.x vs 1.x fix(core): use correct clustering action for 0.x vs 1.x in BaseHoodieTableServiceClient Jun 9, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.20%. Comparing base (aac975c) to head (e8efef5).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
...ache/hudi/client/BaseHoodieTableServiceClient.java 0.00% 1 Missing ⚠️
...che/hudi/client/HoodieFlinkTableServiceClient.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master   #18942   +/-   ##
=========================================
  Coverage     68.20%   68.20%           
  Complexity    29458    29458           
=========================================
  Files          2542     2542           
  Lines        142545   142546    +1     
  Branches      17778    17778           
=========================================
+ Hits          97218    97226    +8     
+ Misses        37316    37310    -6     
+ Partials       8011     8010    -1     
Flag Coverage Δ
common-and-other-modules 44.69% <0.00%> (+<0.01%) ⬆️
hadoop-mr-java-client 44.76% <0.00%> (+0.02%) ⬆️
spark-client-hadoop-common 48.04% <0.00%> (+<0.01%) ⬆️
spark-java-tests 48.78% <0.00%> (+0.01%) ⬆️
spark-scala-tests 44.85% <0.00%> (+<0.01%) ⬆️
utilities 37.29% <0.00%> (+0.01%) ⬆️

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

Files with missing lines Coverage Δ
...ache/hudi/client/BaseHoodieTableServiceClient.java 75.07% <0.00%> (ø)
...che/hudi/client/HoodieFlinkTableServiceClient.java 67.46% <0.00%> (-0.83%) ⬇️

... and 11 files with indirect coverage changes

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

@hudi-bot

hudi-bot commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

CI report:

Bot commands @hudi-bot supports the following commands:
  • @hudi-bot run azure re-run the last Azure build

long durationInMs = metrics.getDurationInMs(clusteringTimer.stop());
TimelineUtils.parseDateFromInstantTimeSafely(clusteringCommitTime).ifPresent(parsedInstant ->
metrics.updateCommitMetrics(parsedInstant.getTime(), durationInMs, replaceCommitMetadata, HoodieActiveTimeline.CLUSTERING_ACTION)
metrics.updateCommitMetrics(parsedInstant.getTime(), durationInMs, replaceCommitMetadata, clusteringInstant.getAction())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we need to hard code this to "replacecommit".

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

Labels

size:S PR with lines of changes in (10, 100]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants