You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "voonhous (via GitHub)" <gi...@apache.org> on 2026/01/12 14:53:56 UTC
[PR] refactor: Add Lombok annotations to hudi-common module (part 4) [hudi]
voonhous opened a new pull request, #17830:
URL: https://github.com/apache/hudi/pull/17830
### 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.
NOTE: Merge this after https://github.com/apache/hudi/pull/17825
### 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
- [x] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute)
- [x] Enough context is provided in the sections above
- [x] Adequate tests were added if applicable
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor: Add Lombok annotations to hudi-common module (part 4) [hudi]
Posted by "voonhous (via GitHub)" <gi...@apache.org>.
voonhous commented on code in PR #17830:
URL: https://github.com/apache/hudi/pull/17830#discussion_r2692936100
##########
hudi-common/src/main/java/org/apache/hudi/common/model/CompactionOperation.java:
##########
@@ -140,36 +115,9 @@ public static CompactionOperation convertFromAvroRecordInstance(HoodieCompaction
op.dataFileName = Option.ofNullable(operation.getDataFilePath());
op.dataFileCommitTime = op.dataFileName.map(p -> FSUtils.getCommitTime(new StoragePath(p).getName()));
op.deltaFileNames = new ArrayList<>(operation.getDeltaFilePaths());
- op.id = new HoodieFileGroupId(operation.getPartitionPath(), operation.getFileId());
+ op.fileGroupId = new HoodieFileGroupId(operation.getPartitionPath(), operation.getFileId());
op.metrics = operation.getMetrics() == null ? new HashMap<>() : new HashMap<>(operation.getMetrics());
op.bootstrapFilePath = Option.ofNullable(operation.getBootstrapFilePath());
return op;
}
-
- @Override
- public String toString() {
- return "CompactionOperation{baseInstantTime='" + baseInstantTime + '\'' + ", dataFileCommitTime="
- + dataFileCommitTime + ", deltaFileNames=" + deltaFileNames + ", dataFileName=" + dataFileName + ", id='" + id
- + '\'' + ", metrics=" + metrics + ", bootstrapFilePath=" + bootstrapFilePath + '}';
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- CompactionOperation operation = (CompactionOperation) o;
- return Objects.equals(baseInstantTime, operation.baseInstantTime)
- && Objects.equals(dataFileCommitTime, operation.dataFileCommitTime)
- && Objects.equals(deltaFileNames, operation.deltaFileNames)
- && Objects.equals(dataFileName, operation.dataFileName) && Objects.equals(id, operation.id);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(baseInstantTime, id);
Review Comment:
Let me check on this. We did experience something similar here too:
https://github.com/apache/hudi/pull/17655#discussion_r2674794012
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor: Add Lombok annotations to hudi-common module (part 4) [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #17830:
URL: https://github.com/apache/hudi/pull/17830#issuecomment-3751583891
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "c9934a15ddc8ef2da3c16c2a761f43aecd0b0aca",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10945",
"triggerID" : "c9934a15ddc8ef2da3c16c2a761f43aecd0b0aca",
"triggerType" : "PUSH"
}, {
"hash" : "2864ffaa1a90e8c5ea23fe24dcc9607990307ad5",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11055",
"triggerID" : "2864ffaa1a90e8c5ea23fe24dcc9607990307ad5",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 2864ffaa1a90e8c5ea23fe24dcc9607990307ad5 Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11055)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor: Add Lombok annotations to hudi-common module (part 4) [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #17830:
URL: https://github.com/apache/hudi/pull/17830#issuecomment-3752866878
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "c9934a15ddc8ef2da3c16c2a761f43aecd0b0aca",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10945",
"triggerID" : "c9934a15ddc8ef2da3c16c2a761f43aecd0b0aca",
"triggerType" : "PUSH"
}, {
"hash" : "2864ffaa1a90e8c5ea23fe24dcc9607990307ad5",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11055",
"triggerID" : "2864ffaa1a90e8c5ea23fe24dcc9607990307ad5",
"triggerType" : "PUSH"
}, {
"hash" : "c9ee36d8c6495edd7df2f733ffa6e4ac681b95b0",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "c9ee36d8c6495edd7df2f733ffa6e4ac681b95b0",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 2864ffaa1a90e8c5ea23fe24dcc9607990307ad5 Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11055)
* c9ee36d8c6495edd7df2f733ffa6e4ac681b95b0 UNKNOWN
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor: Add Lombok annotations to hudi-common module (part 4) [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #17830:
URL: https://github.com/apache/hudi/pull/17830#issuecomment-3738972291
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "c9934a15ddc8ef2da3c16c2a761f43aecd0b0aca",
"status" : "PENDING",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10945",
"triggerID" : "c9934a15ddc8ef2da3c16c2a761f43aecd0b0aca",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* c9934a15ddc8ef2da3c16c2a761f43aecd0b0aca Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10945)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor: Add Lombok annotations to hudi-common module (part 4) [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #17830:
URL: https://github.com/apache/hudi/pull/17830#issuecomment-3751149732
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "c9934a15ddc8ef2da3c16c2a761f43aecd0b0aca",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10945",
"triggerID" : "c9934a15ddc8ef2da3c16c2a761f43aecd0b0aca",
"triggerType" : "PUSH"
}, {
"hash" : "2864ffaa1a90e8c5ea23fe24dcc9607990307ad5",
"status" : "PENDING",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11055",
"triggerID" : "2864ffaa1a90e8c5ea23fe24dcc9607990307ad5",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* c9934a15ddc8ef2da3c16c2a761f43aecd0b0aca Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10945)
* 2864ffaa1a90e8c5ea23fe24dcc9607990307ad5 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11055)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor: Add Lombok annotations to hudi-common module (part 4) [hudi]
Posted by "the-other-tim-brown (via GitHub)" <gi...@apache.org>.
the-other-tim-brown commented on code in PR #17830:
URL: https://github.com/apache/hudi/pull/17830#discussion_r2692642216
##########
hudi-common/src/main/java/org/apache/hudi/common/model/BaseFile.java:
##########
@@ -55,66 +69,13 @@ public BaseFile(String filePath) {
this(null, filePath, getFileName(filePath), -1);
}
- private BaseFile(StoragePathInfo pathInfo, String fullPath, String fileName, long fileLen) {
- this.pathInfo = pathInfo;
- this.fullPath = fullPath;
- this.fileLen = fileLen;
- this.fileName = fileName;
- }
-
- public String getPath() {
Review Comment:
Can we keep this getter as `getPath` instead of `getFullPath` to minimize the diff?
##########
hudi-common/src/main/java/org/apache/hudi/common/model/CompactionOperation.java:
##########
@@ -140,36 +115,9 @@ public static CompactionOperation convertFromAvroRecordInstance(HoodieCompaction
op.dataFileName = Option.ofNullable(operation.getDataFilePath());
op.dataFileCommitTime = op.dataFileName.map(p -> FSUtils.getCommitTime(new StoragePath(p).getName()));
op.deltaFileNames = new ArrayList<>(operation.getDeltaFilePaths());
- op.id = new HoodieFileGroupId(operation.getPartitionPath(), operation.getFileId());
+ op.fileGroupId = new HoodieFileGroupId(operation.getPartitionPath(), operation.getFileId());
op.metrics = operation.getMetrics() == null ? new HashMap<>() : new HashMap<>(operation.getMetrics());
op.bootstrapFilePath = Option.ofNullable(operation.getBootstrapFilePath());
return op;
}
-
- @Override
- public String toString() {
- return "CompactionOperation{baseInstantTime='" + baseInstantTime + '\'' + ", dataFileCommitTime="
- + dataFileCommitTime + ", deltaFileNames=" + deltaFileNames + ", dataFileName=" + dataFileName + ", id='" + id
- + '\'' + ", metrics=" + metrics + ", bootstrapFilePath=" + bootstrapFilePath + '}';
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- CompactionOperation operation = (CompactionOperation) o;
- return Objects.equals(baseInstantTime, operation.baseInstantTime)
- && Objects.equals(dataFileCommitTime, operation.dataFileCommitTime)
- && Objects.equals(deltaFileNames, operation.deltaFileNames)
- && Objects.equals(dataFileName, operation.dataFileName) && Objects.equals(id, operation.id);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(baseInstantTime, id);
Review Comment:
Do you know if this is intentional or a bug?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor: Add Lombok annotations to hudi-common module (part 4) [hudi]
Posted by "voonhous (via GitHub)" <gi...@apache.org>.
voonhous merged PR #17830:
URL: https://github.com/apache/hudi/pull/17830
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor: Add Lombok annotations to hudi-common module (part 4) [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #17830:
URL: https://github.com/apache/hudi/pull/17830#issuecomment-3752871178
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "c9934a15ddc8ef2da3c16c2a761f43aecd0b0aca",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10945",
"triggerID" : "c9934a15ddc8ef2da3c16c2a761f43aecd0b0aca",
"triggerType" : "PUSH"
}, {
"hash" : "2864ffaa1a90e8c5ea23fe24dcc9607990307ad5",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11055",
"triggerID" : "2864ffaa1a90e8c5ea23fe24dcc9607990307ad5",
"triggerType" : "PUSH"
}, {
"hash" : "c9ee36d8c6495edd7df2f733ffa6e4ac681b95b0",
"status" : "PENDING",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11077",
"triggerID" : "c9ee36d8c6495edd7df2f733ffa6e4ac681b95b0",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 2864ffaa1a90e8c5ea23fe24dcc9607990307ad5 Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11055)
* c9ee36d8c6495edd7df2f733ffa6e4ac681b95b0 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11077)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor: Add Lombok annotations to hudi-common module (part 4) [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #17830:
URL: https://github.com/apache/hudi/pull/17830#issuecomment-3751138775
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "c9934a15ddc8ef2da3c16c2a761f43aecd0b0aca",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10945",
"triggerID" : "c9934a15ddc8ef2da3c16c2a761f43aecd0b0aca",
"triggerType" : "PUSH"
}, {
"hash" : "2864ffaa1a90e8c5ea23fe24dcc9607990307ad5",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "2864ffaa1a90e8c5ea23fe24dcc9607990307ad5",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* c9934a15ddc8ef2da3c16c2a761f43aecd0b0aca Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10945)
* 2864ffaa1a90e8c5ea23fe24dcc9607990307ad5 UNKNOWN
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor: Add Lombok annotations to hudi-common module (part 4) [hudi]
Posted by "voonhous (via GitHub)" <gi...@apache.org>.
voonhous commented on code in PR #17830:
URL: https://github.com/apache/hudi/pull/17830#discussion_r2692956636
##########
hudi-common/src/main/java/org/apache/hudi/common/model/CompactionOperation.java:
##########
@@ -140,36 +115,9 @@ public static CompactionOperation convertFromAvroRecordInstance(HoodieCompaction
op.dataFileName = Option.ofNullable(operation.getDataFilePath());
op.dataFileCommitTime = op.dataFileName.map(p -> FSUtils.getCommitTime(new StoragePath(p).getName()));
op.deltaFileNames = new ArrayList<>(operation.getDeltaFilePaths());
- op.id = new HoodieFileGroupId(operation.getPartitionPath(), operation.getFileId());
+ op.fileGroupId = new HoodieFileGroupId(operation.getPartitionPath(), operation.getFileId());
op.metrics = operation.getMetrics() == null ? new HashMap<>() : new HashMap<>(operation.getMetrics());
op.bootstrapFilePath = Option.ofNullable(operation.getBootstrapFilePath());
return op;
}
-
- @Override
- public String toString() {
- return "CompactionOperation{baseInstantTime='" + baseInstantTime + '\'' + ", dataFileCommitTime="
- + dataFileCommitTime + ", deltaFileNames=" + deltaFileNames + ", dataFileName=" + dataFileName + ", id='" + id
- + '\'' + ", metrics=" + metrics + ", bootstrapFilePath=" + bootstrapFilePath + '}';
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- CompactionOperation operation = (CompactionOperation) o;
- return Objects.equals(baseInstantTime, operation.baseInstantTime)
- && Objects.equals(dataFileCommitTime, operation.dataFileCommitTime)
- && Objects.equals(deltaFileNames, operation.deltaFileNames)
- && Objects.equals(dataFileName, operation.dataFileName) && Objects.equals(id, operation.id);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(baseInstantTime, id);
Review Comment:
Seems to be a dev error from the getgo in the commit below way before Hudi was opensourced.
Specifically:
https://github.com/apache/hudi/commit/64fec640975b42b0645c75416eb8bbf0b8092c66#diff-144d143726704055a5b8f62e80a881967611d9b0585cd268ec9ddc34add7d098R130-R161
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor: Add Lombok annotations to hudi-common module (part 4) [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #17830:
URL: https://github.com/apache/hudi/pull/17830#issuecomment-3739015697
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "c9934a15ddc8ef2da3c16c2a761f43aecd0b0aca",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10945",
"triggerID" : "c9934a15ddc8ef2da3c16c2a761f43aecd0b0aca",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* c9934a15ddc8ef2da3c16c2a761f43aecd0b0aca Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10945)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor: Add Lombok annotations to hudi-common module (part 4) [hudi]
Posted by "voonhous (via GitHub)" <gi...@apache.org>.
voonhous commented on code in PR #17830:
URL: https://github.com/apache/hudi/pull/17830#discussion_r2692956636
##########
hudi-common/src/main/java/org/apache/hudi/common/model/CompactionOperation.java:
##########
@@ -140,36 +115,9 @@ public static CompactionOperation convertFromAvroRecordInstance(HoodieCompaction
op.dataFileName = Option.ofNullable(operation.getDataFilePath());
op.dataFileCommitTime = op.dataFileName.map(p -> FSUtils.getCommitTime(new StoragePath(p).getName()));
op.deltaFileNames = new ArrayList<>(operation.getDeltaFilePaths());
- op.id = new HoodieFileGroupId(operation.getPartitionPath(), operation.getFileId());
+ op.fileGroupId = new HoodieFileGroupId(operation.getPartitionPath(), operation.getFileId());
op.metrics = operation.getMetrics() == null ? new HashMap<>() : new HashMap<>(operation.getMetrics());
op.bootstrapFilePath = Option.ofNullable(operation.getBootstrapFilePath());
return op;
}
-
- @Override
- public String toString() {
- return "CompactionOperation{baseInstantTime='" + baseInstantTime + '\'' + ", dataFileCommitTime="
- + dataFileCommitTime + ", deltaFileNames=" + deltaFileNames + ", dataFileName=" + dataFileName + ", id='" + id
- + '\'' + ", metrics=" + metrics + ", bootstrapFilePath=" + bootstrapFilePath + '}';
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- CompactionOperation operation = (CompactionOperation) o;
- return Objects.equals(baseInstantTime, operation.baseInstantTime)
- && Objects.equals(dataFileCommitTime, operation.dataFileCommitTime)
- && Objects.equals(deltaFileNames, operation.deltaFileNames)
- && Objects.equals(dataFileName, operation.dataFileName) && Objects.equals(id, operation.id);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(baseInstantTime, id);
Review Comment:
Seems to be a dev error from the getgo in this commit 64fec640975b42b0645c75416eb8bbf0b8092c66 way before Hudi was opensourced
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor: Add Lombok annotations to hudi-common module (part 4) [hudi]
Posted by "voonhous (via GitHub)" <gi...@apache.org>.
voonhous commented on code in PR #17830:
URL: https://github.com/apache/hudi/pull/17830#discussion_r2692963894
##########
hudi-common/src/main/java/org/apache/hudi/common/model/BaseFile.java:
##########
@@ -55,66 +69,13 @@ public BaseFile(String filePath) {
this(null, filePath, getFileName(filePath), -1);
}
- private BaseFile(StoragePathInfo pathInfo, String fullPath, String fileName, long fileLen) {
- this.pathInfo = pathInfo;
- this.fullPath = fullPath;
- this.fileLen = fileLen;
- this.fileName = fileName;
- }
-
- public String getPath() {
Review Comment:
Done, I've change the attribute/field to `path` from `fullPath` so that the getter generated by Lombok is `getPath`.
On top of that, i've added a comment. This will reduce scope of the changes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor: Add Lombok annotations to hudi-common module (part 4) [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #17830:
URL: https://github.com/apache/hudi/pull/17830#issuecomment-3738961442
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "c9934a15ddc8ef2da3c16c2a761f43aecd0b0aca",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "c9934a15ddc8ef2da3c16c2a761f43aecd0b0aca",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* c9934a15ddc8ef2da3c16c2a761f43aecd0b0aca UNKNOWN
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor: Add Lombok annotations to hudi-common module (part 4) [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #17830:
URL: https://github.com/apache/hudi/pull/17830#issuecomment-3753040325
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "c9934a15ddc8ef2da3c16c2a761f43aecd0b0aca",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=10945",
"triggerID" : "c9934a15ddc8ef2da3c16c2a761f43aecd0b0aca",
"triggerType" : "PUSH"
}, {
"hash" : "2864ffaa1a90e8c5ea23fe24dcc9607990307ad5",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11055",
"triggerID" : "2864ffaa1a90e8c5ea23fe24dcc9607990307ad5",
"triggerType" : "PUSH"
}, {
"hash" : "c9ee36d8c6495edd7df2f733ffa6e4ac681b95b0",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11077",
"triggerID" : "c9ee36d8c6495edd7df2f733ffa6e4ac681b95b0",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* c9ee36d8c6495edd7df2f733ffa6e4ac681b95b0 Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=11077)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor: Add Lombok annotations to hudi-common module (part 4) [hudi]
Posted by "voonhous (via GitHub)" <gi...@apache.org>.
voonhous commented on code in PR #17830:
URL: https://github.com/apache/hudi/pull/17830#discussion_r2692956636
##########
hudi-common/src/main/java/org/apache/hudi/common/model/CompactionOperation.java:
##########
@@ -140,36 +115,9 @@ public static CompactionOperation convertFromAvroRecordInstance(HoodieCompaction
op.dataFileName = Option.ofNullable(operation.getDataFilePath());
op.dataFileCommitTime = op.dataFileName.map(p -> FSUtils.getCommitTime(new StoragePath(p).getName()));
op.deltaFileNames = new ArrayList<>(operation.getDeltaFilePaths());
- op.id = new HoodieFileGroupId(operation.getPartitionPath(), operation.getFileId());
+ op.fileGroupId = new HoodieFileGroupId(operation.getPartitionPath(), operation.getFileId());
op.metrics = operation.getMetrics() == null ? new HashMap<>() : new HashMap<>(operation.getMetrics());
op.bootstrapFilePath = Option.ofNullable(operation.getBootstrapFilePath());
return op;
}
-
- @Override
- public String toString() {
- return "CompactionOperation{baseInstantTime='" + baseInstantTime + '\'' + ", dataFileCommitTime="
- + dataFileCommitTime + ", deltaFileNames=" + deltaFileNames + ", dataFileName=" + dataFileName + ", id='" + id
- + '\'' + ", metrics=" + metrics + ", bootstrapFilePath=" + bootstrapFilePath + '}';
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
- CompactionOperation operation = (CompactionOperation) o;
- return Objects.equals(baseInstantTime, operation.baseInstantTime)
- && Objects.equals(dataFileCommitTime, operation.dataFileCommitTime)
- && Objects.equals(deltaFileNames, operation.deltaFileNames)
- && Objects.equals(dataFileName, operation.dataFileName) && Objects.equals(id, operation.id);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(baseInstantTime, id);
Review Comment:
Seems to be a dev error from the getgo in this commit a7e6cf51974f96c6b4bc945db25658cbb4bc48c7 way before Hudi was opensourced
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org