Skip to content

refactor: Add Lombok annotations to hudi-common module (part 1)#17630

Merged
yihua merged 2 commits intoapache:masterfrom
voonhous:hudi-common-lombokify
Dec 20, 2025
Merged

refactor: Add Lombok annotations to hudi-common module (part 1)#17630
yihua merged 2 commits intoapache:masterfrom
voonhous:hudi-common-lombokify

Conversation

@voonhous
Copy link
Member

@voonhous voonhous commented Dec 17, 2025

Describe the issue this Pull Request addresses

This PR refactors the hudi-common module to reduce boilerplate code by leveraging Project Lombok annotations. Specifically, it replaces explicit Logger instantiation, manual getter/setter methods, and empty constructors with their equivalent Lombok annotations (@Slf4j, @Getter, @Setter,@NoArgsConstructor, @AllArgsConstructor, @Data, @Value, @ToString).

This improves code readability and maintainability without altering the runtime logic.

To make the PR more manageable, adding Lombok to hudi-common will be split into multiple parts. This is the FIRST part.

Summary and Changelog

This change introduces the Lombok dependency to the hudi-common module and refactors several classes to utilize Lombok annotations.

  • Added lombok annotations wherever possible to hudi-common module.

This PR covers:

  1. hudi-common/src/main/java/org/apache/hudi/avro
  2. hudi-common/src/main/java/org/apache/hudi/lock
  3. hudi-common/src/main/java/org/apache/hudi/common
  4. hudi-common/src/main/java/org/apache/hudi/metrics
  5. hudi-common/src/main/java/org/apache/hudi/exception
  6. hudi-common/src/main/java/org/apache/hudi/expression
  7. hudi-common/src/main/java/org/apache/hudi/index
  8. hudi-common/src/test

Impact

  • Public API: None.
  • User Experience: No visible change for end-users.
  • Performance: No impact (compile-time code generation).
  • Code Health: Reduces lines of code and standardizes logging/accessor patterns.

Risk Level

none

(This is a pure refactoring change involving standard library annotations; no business logic was modified.)

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

- avro
- client/transaction/lock
- exception
- expression
- index/secondary
- all tests
@voonhous voonhous changed the title refactor: Add refactor: Add Lombok annotations to hudi-common module (part 1) Dec 17, 2025
@github-actions github-actions bot added the size:L PR with lines of changes in (300, 1000] label Dec 17, 2025
@voonhous voonhous force-pushed the hudi-common-lombokify branch from 7c074e9 to 2d315e9 Compare December 18, 2025 02:55
@hudi-bot
Copy link
Collaborator

CI report:

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

@voonhous voonhous requested a review from yihua December 18, 2025 10:41
Copy link
Contributor

@yihua yihua left a comment

Choose a reason for hiding this comment

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

LGTM

@yihua yihua merged commit f65bf52 into apache:master Dec 20, 2025
70 checks passed
@voonhous voonhous deleted the hudi-common-lombokify branch December 20, 2025 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L PR with lines of changes in (300, 1000]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants