You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/03/02 07:04:59 UTC
[GitHub] [hudi] scxwhite opened a new pull request #4932: [HUDI-3069] compact improve
scxwhite opened a new pull request #4932:
URL: https://github.com/apache/hudi/pull/4932
## *Tips*
- *Thank you very much for contributing to Apache Hudi.*
- *Please review https://hudi.apache.org/contribute/how-to-contribute before opening a pull request.*
## What is the purpose of the pull request
when reading the delta log file, we compare the data in the external spillablemap with the delta log data. If oldrecord is selected, there is no need to rewrite the data in the external spillablemap. Rewriting data will waste a lot of resources when data is spill to disk
## Brief change log
*(for example:)*
- *Modify AnnotationLocation checkstyle rule in checkstyle.xml*
## Verify this pull request
*(Please pick either of the following options)*
This pull request is a trivial rework / code cleanup without any test coverage.
*(or)*
This pull request is already covered by existing tests, such as *(please describe tests)*.
(or)
This change added tests and can be verified as follows:
*(example:)*
- *Added integration tests for end-to-end.*
- *Added HoodieClientWriteTest to verify the change.*
- *Manually verified the change by running a job locally.*
## Committer checklist
- [ ] Has a corresponding JIRA in PR title & commit
- [ ] Commit message is descriptive of the change
- [ ] CI is green
- [ ] Necessary doc changes done or have another open PR
- [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.
--
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
[GitHub] [hudi] scxwhite commented on a change in pull request #4932: [HUDI-3069] compact improve
Posted by GitBox <gi...@apache.org>.
scxwhite commented on a change in pull request #4932:
URL: https://github.com/apache/hudi/pull/4932#discussion_r817492078
##########
File path: hudi-common/src/main/java/org/apache/hudi/common/table/log/HoodieMergedLogRecordScanner.java
##########
@@ -143,9 +143,11 @@ protected void processNextRecord(HoodieRecord<? extends HoodieRecordPayload> hoo
HoodieRecord<? extends HoodieRecordPayload> oldRecord = records.get(key);
HoodieRecordPayload oldValue = oldRecord.getData();
HoodieRecordPayload combinedValue = hoodieRecord.getData().preCombine(oldValue);
- boolean choosePrev = combinedValue.equals(oldValue);
- HoodieOperation operation = choosePrev ? oldRecord.getOperation() : hoodieRecord.getOperation();
- records.put(key, new HoodieAvroRecord<>(new HoodieKey(key, hoodieRecord.getPartitionPath()), combinedValue, operation));
+ // If combinedValue is oldValue, no need rePut oldRecord
+ if (!combinedValue.equals(oldValue)) {
+ HoodieOperation operation = hoodieRecord.getOperation();
Review comment:
fixed. please review again.
--
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
[GitHub] [hudi] danny0405 merged pull request #4932: [HUDI-3069] Improve HoodieMergedLogRecordScanner avoid putting unnecessary hoodie records
Posted by GitBox <gi...@apache.org>.
danny0405 merged pull request #4932:
URL: https://github.com/apache/hudi/pull/4932
--
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
[GitHub] [hudi] hudi-bot commented on pull request #4932: [HUDI-3069] compact improve
Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #4932:
URL: https://github.com/apache/hudi/pull/4932#issuecomment-1056419769
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "4c33fc175ac3efd0664e9e3fceba89c7493a7a45",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "4c33fc175ac3efd0664e9e3fceba89c7493a7a45",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 4c33fc175ac3efd0664e9e3fceba89c7493a7a45 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
[GitHub] [hudi] hudi-bot removed a comment on pull request #4932: [HUDI-3069] compact improve
Posted by GitBox <gi...@apache.org>.
hudi-bot removed a comment on pull request #4932:
URL: https://github.com/apache/hudi/pull/4932#issuecomment-1056543902
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "4c33fc175ac3efd0664e9e3fceba89c7493a7a45",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6458",
"triggerID" : "4c33fc175ac3efd0664e9e3fceba89c7493a7a45",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 4c33fc175ac3efd0664e9e3fceba89c7493a7a45 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6458)
<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
[GitHub] [hudi] hudi-bot commented on pull request #4932: [HUDI-3069] compact improve
Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #4932:
URL: https://github.com/apache/hudi/pull/4932#issuecomment-1056543902
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "4c33fc175ac3efd0664e9e3fceba89c7493a7a45",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6458",
"triggerID" : "4c33fc175ac3efd0664e9e3fceba89c7493a7a45",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 4c33fc175ac3efd0664e9e3fceba89c7493a7a45 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6458)
<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
[GitHub] [hudi] hudi-bot commented on pull request #4932: [HUDI-3069] compact improve
Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #4932:
URL: https://github.com/apache/hudi/pull/4932#issuecomment-1056763568
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "4c33fc175ac3efd0664e9e3fceba89c7493a7a45",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6458",
"triggerID" : "4c33fc175ac3efd0664e9e3fceba89c7493a7a45",
"triggerType" : "PUSH"
}, {
"hash" : "d2b6327daf8b78126476733421def4089d02440e",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6463",
"triggerID" : "d2b6327daf8b78126476733421def4089d02440e",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* d2b6327daf8b78126476733421def4089d02440e Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6463)
<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
[GitHub] [hudi] scxwhite commented on pull request #4932: [HUDI-3069] compact improve
Posted by GitBox <gi...@apache.org>.
scxwhite commented on pull request #4932:
URL: https://github.com/apache/hudi/pull/4932#issuecomment-1056414893
old pr : https://github.com/apache/hudi/pull/4400
--
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
[GitHub] [hudi] hudi-bot removed a comment on pull request #4932: [HUDI-3069] compact improve
Posted by GitBox <gi...@apache.org>.
hudi-bot removed a comment on pull request #4932:
URL: https://github.com/apache/hudi/pull/4932#issuecomment-1056656413
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "4c33fc175ac3efd0664e9e3fceba89c7493a7a45",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6458",
"triggerID" : "4c33fc175ac3efd0664e9e3fceba89c7493a7a45",
"triggerType" : "PUSH"
}, {
"hash" : "d2b6327daf8b78126476733421def4089d02440e",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6463",
"triggerID" : "d2b6327daf8b78126476733421def4089d02440e",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 4c33fc175ac3efd0664e9e3fceba89c7493a7a45 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6458)
* d2b6327daf8b78126476733421def4089d02440e Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6463)
<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
[GitHub] [hudi] hudi-bot removed a comment on pull request #4932: [HUDI-3069] compact improve
Posted by GitBox <gi...@apache.org>.
hudi-bot removed a comment on pull request #4932:
URL: https://github.com/apache/hudi/pull/4932#issuecomment-1056426886
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "4c33fc175ac3efd0664e9e3fceba89c7493a7a45",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6458",
"triggerID" : "4c33fc175ac3efd0664e9e3fceba89c7493a7a45",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 4c33fc175ac3efd0664e9e3fceba89c7493a7a45 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6458)
<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
[GitHub] [hudi] danny0405 commented on a change in pull request #4932: [HUDI-3069] compact improve
Posted by GitBox <gi...@apache.org>.
danny0405 commented on a change in pull request #4932:
URL: https://github.com/apache/hudi/pull/4932#discussion_r817464786
##########
File path: hudi-common/src/main/java/org/apache/hudi/common/table/log/HoodieMergedLogRecordScanner.java
##########
@@ -143,9 +143,11 @@ protected void processNextRecord(HoodieRecord<? extends HoodieRecordPayload> hoo
HoodieRecord<? extends HoodieRecordPayload> oldRecord = records.get(key);
HoodieRecordPayload oldValue = oldRecord.getData();
HoodieRecordPayload combinedValue = hoodieRecord.getData().preCombine(oldValue);
- boolean choosePrev = combinedValue.equals(oldValue);
- HoodieOperation operation = choosePrev ? oldRecord.getOperation() : hoodieRecord.getOperation();
- records.put(key, new HoodieAvroRecord<>(new HoodieKey(key, hoodieRecord.getPartitionPath()), combinedValue, operation));
+ // If combinedValue is oldValue, no need rePut oldRecord
+ if (!combinedValue.equals(oldValue)) {
+ HoodieOperation operation = hoodieRecord.getOperation();
Review comment:
We can use `==` instead which is more efficient. Currently the payload clazz has no uniform `#equals` yet.
--
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
[GitHub] [hudi] hudi-bot commented on pull request #4932: [HUDI-3069] compact improve
Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #4932:
URL: https://github.com/apache/hudi/pull/4932#issuecomment-1056650550
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "4c33fc175ac3efd0664e9e3fceba89c7493a7a45",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6458",
"triggerID" : "4c33fc175ac3efd0664e9e3fceba89c7493a7a45",
"triggerType" : "PUSH"
}, {
"hash" : "d2b6327daf8b78126476733421def4089d02440e",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "d2b6327daf8b78126476733421def4089d02440e",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 4c33fc175ac3efd0664e9e3fceba89c7493a7a45 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6458)
* d2b6327daf8b78126476733421def4089d02440e 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
[GitHub] [hudi] hudi-bot removed a comment on pull request #4932: [HUDI-3069] compact improve
Posted by GitBox <gi...@apache.org>.
hudi-bot removed a comment on pull request #4932:
URL: https://github.com/apache/hudi/pull/4932#issuecomment-1056419769
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "4c33fc175ac3efd0664e9e3fceba89c7493a7a45",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "4c33fc175ac3efd0664e9e3fceba89c7493a7a45",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 4c33fc175ac3efd0664e9e3fceba89c7493a7a45 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
[GitHub] [hudi] hudi-bot removed a comment on pull request #4932: [HUDI-3069] compact improve
Posted by GitBox <gi...@apache.org>.
hudi-bot removed a comment on pull request #4932:
URL: https://github.com/apache/hudi/pull/4932#issuecomment-1056650550
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "4c33fc175ac3efd0664e9e3fceba89c7493a7a45",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6458",
"triggerID" : "4c33fc175ac3efd0664e9e3fceba89c7493a7a45",
"triggerType" : "PUSH"
}, {
"hash" : "d2b6327daf8b78126476733421def4089d02440e",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "d2b6327daf8b78126476733421def4089d02440e",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 4c33fc175ac3efd0664e9e3fceba89c7493a7a45 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6458)
* d2b6327daf8b78126476733421def4089d02440e 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
[GitHub] [hudi] hudi-bot commented on pull request #4932: [HUDI-3069] compact improve
Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #4932:
URL: https://github.com/apache/hudi/pull/4932#issuecomment-1056426886
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "4c33fc175ac3efd0664e9e3fceba89c7493a7a45",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6458",
"triggerID" : "4c33fc175ac3efd0664e9e3fceba89c7493a7a45",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 4c33fc175ac3efd0664e9e3fceba89c7493a7a45 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6458)
<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
[GitHub] [hudi] hudi-bot commented on pull request #4932: [HUDI-3069] compact improve
Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #4932:
URL: https://github.com/apache/hudi/pull/4932#issuecomment-1056656413
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "4c33fc175ac3efd0664e9e3fceba89c7493a7a45",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6458",
"triggerID" : "4c33fc175ac3efd0664e9e3fceba89c7493a7a45",
"triggerType" : "PUSH"
}, {
"hash" : "d2b6327daf8b78126476733421def4089d02440e",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6463",
"triggerID" : "d2b6327daf8b78126476733421def4089d02440e",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 4c33fc175ac3efd0664e9e3fceba89c7493a7a45 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6458)
* d2b6327daf8b78126476733421def4089d02440e Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6463)
<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