Skip to content

fix(aws): implement writer-version update in Glue sync client#18707

Open
deepakpanda93 wants to merge 1 commit into
apache:masterfrom
deepakpanda93:br_fix_gluesync
Open

fix(aws): implement writer-version update in Glue sync client#18707
deepakpanda93 wants to merge 1 commit into
apache:masterfrom
deepakpanda93:br_fix_gluesync

Conversation

@deepakpanda93
Copy link
Copy Markdown
Collaborator

Describe the issue this Pull Request addresses

  • AWSGlueCatalogSyncClient does not implement updateHoodieWriterVersion(), which was introduced as part of the metadata sync flow in Hudi 1.2.0. As a result, Glue sync fails with:
java.lang.UnsupportedOperationException 
at org.apache.hudi.sync.common.HoodieMetaSyncOperations.updateHoodieWriterVersion
  • Glue sync works correctly in Hudi 1.1.1 but fails in 1.2.0-rc1/1.3.0-SNAPSHOT due to the newly introduced writer-version update call path.
  • This PR implements updateHoodieWriterVersion() in AWSGlueCatalogSyncClient to properly update the Hudi writer version in Glue table parameters and avoid the runtime failure.

Summary and Changelog

  • This PR adds support for updating the Hudi writer version during AWS Glue sync operations.

Changes included:

  • Implemented updateHoodieWriterVersion() in AWSGlueCatalogSyncClient

Impact

  • Fixes Glue sync failures in Hudi 1.2.x/1.3.0-SNAPSHOT when using AwsGlueCatalogSyncTool

Risk Level

low

Documentation Update

none

Contributor's checklist

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

@github-actions github-actions Bot added the size:S PR with lines of changes in (10, 100] label May 8, 2026
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.14%. Comparing base (47bf4e4) to head (b1033ca).

Files with missing lines Patch % Lines
...apache/hudi/aws/sync/AWSGlueCatalogSyncClient.java 0.00% 7 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #18707      +/-   ##
============================================
- Coverage     68.14%   68.14%   -0.01%     
+ Complexity    29077    29075       -2     
============================================
  Files          2522     2522              
  Lines        141177   141184       +7     
  Branches      17514    17514              
============================================
- Hits          96208    96205       -3     
- Misses        37061    37069       +8     
- Partials       7908     7910       +2     
Flag Coverage Δ
common-and-other-modules 44.42% <0.00%> (-0.01%) ⬇️
hadoop-mr-java-client 45.00% <ø> (-0.01%) ⬇️
spark-client-hadoop-common 48.35% <ø> (+<0.01%) ⬆️
spark-java-tests 48.99% <0.00%> (-0.01%) ⬇️
spark-scala-tests 44.91% <0.00%> (+<0.01%) ⬆️
utilities 37.61% <0.00%> (-0.02%) ⬇️

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

Files with missing lines Coverage Δ
...apache/hudi/aws/sync/AWSGlueCatalogSyncClient.java 49.15% <0.00%> (-0.54%) ⬇️

... and 6 files with indirect coverage changes

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

@deepakpanda93 deepakpanda93 marked this pull request as ready for review May 8, 2026 12:53
@deepakpanda93 deepakpanda93 requested review from bhasudha and yihua May 8, 2026 12:53
@hudi-bot
Copy link
Copy Markdown
Collaborator

hudi-bot commented May 8, 2026

CI report:

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

Copy link
Copy Markdown
Contributor

@hudi-agent hudi-agent left a comment

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 contribution! This PR implements the missing updateHoodieWriterVersion() in AWSGlueCatalogSyncClient so Glue sync no longer fails with UnsupportedOperationException on Hudi 1.2.x/1.3.0-SNAPSHOT. The implementation reuses the existing updateTableParameters helper and mirrors the equivalent HoodieHiveSyncClient behavior. No correctness issues found. A few style/readability suggestions in the inline comments. Please take a look, and this should be ready for a Hudi committer or PMC member to take it from here. One small wording nit in the new error message.

cc @yihua

Collections.singletonMap(HoodieVersion.HOODIE_WRITER_VERSION, HoodieVersion.get()),
skipTableArchive);
} catch (Exception e) {
throw new HoodieGlueSyncException(String.format("Failed to update hudi writer major version %s for %s",
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.

🤖 nit: the error message says "hudi writer major version" but HoodieVersion.get() returns the full version string (e.g. 0.14.0), not just the major. Could you drop "major" here? Also, could you swap "hudi" for "Hoodie" to stay consistent with the codebase convention?

- AI-generated; verify before applying. React 👍/👎 to flag quality.

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.

4 participants