-
Notifications
You must be signed in to change notification settings - Fork 2.5k
refactor: Add Lombok annotations to hudi-utilities (Part 2) #17876
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| } | ||
|
|
||
| @Override | ||
| public String toString() { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
| /** | ||
| * 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. | ||
| */ |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
dc9c749 to
e5e1c4b
Compare
e5e1c4b to
c18038d
Compare
Describe the issue this Pull Request addresses
This PR refactors the
hudi-utilitiesmodule to reduce boilerplate code by leveraging Project Lombok annotations. Specifically, it replaces explicitLoggerinstantiation, 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-utilitiesmodule and refactors several classes to utilize Lombok annotations.hudi-utilitiesmodules.Impact
Risk Level
none
(This is a pure refactoring change involving standard library annotations; no business logic was modified.)
Documentation Update
none
Contributor's checklist