-
Notifications
You must be signed in to change notification settings - Fork 2.5k
refactor: Add Lombok annotations to hudi-common module (part 2) #17655
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
Conversation
|
Subsequent PRs that will be raised after this will cover The refactoring will touch 100++ files, I'll be splitting the changes within this directory into smaller PRs to make reviewing manageable. |
| return this.versionId; | ||
| } |
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.
We could change this field to schemaId, and rename this function to getSchemaId (which will be generated by @Getter), but I'm afraid of exploding this PR. So am gonna retain this for now. We can circle back later.
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.
Got it. We can leave it alone for now.
hudi-common/src/main/java/org/apache/hudi/stats/HoodieColumnRangeMetadata.java
Outdated
Show resolved
Hide resolved
625d9e5 to
d11777e
Compare
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieTableMetadataUtil.java
Outdated
Show resolved
Hide resolved
hudi-common/src/main/java/org/apache/hudi/stats/HoodieColumnRangeMetadata.java
Show resolved
Hide resolved
d5aace1 to
11d8ef7
Compare
CTTY
left a comment
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.
LGTM in general! Just some minor improvements on logging can be added
.../src/main/java/org/apache/hudi/internal/schema/io/FileBasedInternalSchemaStorageManager.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/apache/hudi/internal/schema/io/FileBasedInternalSchemaStorageManager.java
Outdated
Show resolved
Hide resolved
hudi-common/src/main/java/org/apache/hudi/metrics/m3/M3MetricsReporter.java
Outdated
Show resolved
Hide resolved
hudi-common/src/main/java/org/apache/hudi/metrics/m3/M3MetricsReporter.java
Outdated
Show resolved
Hide resolved
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieTableMetadataUtil.java
Outdated
Show resolved
Hide resolved
hudi-common/src/main/java/org/apache/hudi/io/storage/HoodieNativeAvroHFileReader.java
Outdated
Show resolved
Hide resolved
yihua
left a comment
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.
LGTM
Describe the issue this Pull Request addresses
This PR refactors the
hudi-commonmodule 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.
To make the PR more manageable, adding Lombok to
hudi-commonwill be split into multiple parts.Summary and Changelog
This change introduces the Lombok dependency to the
hudi-commonmodule and refactors several classes to utilize Lombok annotations.hudi-commonmodule.This PR covers:
hudi-common/src/main/java/org/apache/hudi/internal/schemahudi-common/src/main/java/org/apache/hudi/io/storagehudi-common/src/main/java/org/apache/hudi/keygenhudi-common/src/main/java/org/apache/hudi/metadatahudi-common/src/main/java/org/apache/hudi/metricshudi-common/src/main/java/org/apache/hudi/statshudi-common/src/main/java/org/apache/hudi/timelineImpact
Risk Level
none
(This is a pure refactoring change involving standard library annotations; no business logic was modified.)
Documentation Update
none
Contributor's checklist