Skip to content

Conversation

@voonhous
Copy link
Member

Describe the issue this Pull Request addresses

This PR refactors the hudi-utilities 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.

This is part 2 / 3.

Summary and Changelog

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

  • Added Lombok annotations wherever possible to hudi-utilities modules.

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

@github-actions github-actions bot added the size:L PR with lines of changes in (300, 1000] label Jan 14, 2026
}

@Override
public String toString() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we leave this as is?

Copy link
Member Author

@voonhous voonhous Jan 15, 2026

Choose a reason for hiding this comment

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

I'm okay with leaving it as is, any particular reason why?

The generated string feels a little more informative:

    public String toString() {
      String var10000 = this.name();
      return "IncrSourceHelper.MissingCheckpointStrategy." + var10000 + "(description=" + this.getDescription() + ")";
    }

LMK

Comment on lines -113 to -118
/**
* Configuration used when generating a schema for a proto class.
* @param wrappedPrimitivesAsRecords if true, to treat wrapped primitives like record with a single "value" field. If false, treat them as a nullable field
* @param maxRecursionDepth the number of times to unravel a recursive proto schema before spilling the rest to bytes
* @param timestampsAsRecords if true convert {@link Timestamp} to a Record with a seconds and nanos field. If false, convert it to a long with the timestamp-mircos logical type.
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a way to preserve this? Can it be moved to the class javadoc?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's actually preserved. Only thing not preserved is:
Configuration used when generating a schema for a proto class.. I'll put this above @AllArgsConstructor.

The individual param descriptions are added as comments above each attribute/fields.

@voonhous voonhous force-pushed the lombokify-hudi-utilities-p2 branch from dc9c749 to e5e1c4b Compare January 15, 2026 07:49
@voonhous voonhous force-pushed the lombokify-hudi-utilities-p2 branch from e5e1c4b to c18038d Compare January 15, 2026 07:53
@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

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