You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "xicm (via GitHub)" <gi...@apache.org> on 2024/08/12 09:33:47 UTC
[PR] [MINNOR] improve comaction operator shuffle [hudi]
xicm opened a new pull request, #11757:
URL: https://github.com/apache/hudi/pull/11757
### Change Logs
I found a skew in the flink compaction task.
<img width="1552" alt="微信图片_20240812172514" src="https://github.com/user-attachments/assets/5263e4ca-4af1-4f2f-b581-e1c716527b21">
Compaction task shuffle the compaction operation with ***keyby***, A series of hash mods results in skew.
One file group on compaction operator, so we don't need keyby, just rebalance is OK.
This is the result of rebanlace.
<img width="507" alt="微信图片_20240812172545" src="https://github.com/user-attachments/assets/e19ec957-565f-4a83-a971-d489341c2e55">
### Impact
_Describe any public API or user-facing feature change or any performance impact._
### Risk level (write none, low medium or high below)
_If medium or high, explain what verification was done to mitigate the risks._
### Documentation Update
_Describe any necessary documentation update if there is any new feature, config, or user-facing change. If not, put "none"._
- _The config description must be updated if new configs are added or the default value of the configs are changed_
- _Any new feature or user-facing change requires updating the Hudi website. Please create a Jira ticket, attach the
ticket number here and follow the [instruction](https://hudi.apache.org/contribute/developer-setup#website) to make
changes to the website._
### Contributor's checklist
- [ ] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute)
- [ ] Change Logs and Impact were stated clearly
- [ ] Adequate tests were added if applicable
- [ ] CI passed
--
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] [MINOR] improve comaction operator shuffle [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #11757:
URL: https://github.com/apache/hudi/pull/11757#issuecomment-2285684963
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "ec36c193519719981274a1057610e581ef6583aa",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=25117",
"triggerID" : "ec36c193519719981274a1057610e581ef6583aa",
"triggerType" : "PUSH"
}, {
"hash" : "039fbc7590ce8c4f6052b11c4b682affd1d85fac",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=22",
"triggerID" : "039fbc7590ce8c4f6052b11c4b682affd1d85fac",
"triggerType" : "PUSH"
}, {
"hash" : "039fbc7590ce8c4f6052b11c4b682affd1d85fac",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=19",
"triggerID" : "039fbc7590ce8c4f6052b11c4b682affd1d85fac",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 039fbc7590ce8c4f6052b11c4b682affd1d85fac Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=22) Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=19)
<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] [MINOR] improve comaction operator shuffle [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #11757:
URL: https://github.com/apache/hudi/pull/11757#issuecomment-2283543056
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "ec36c193519719981274a1057610e581ef6583aa",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "ec36c193519719981274a1057610e581ef6583aa",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* ec36c193519719981274a1057610e581ef6583aa 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] [MINOR] improve comaction operator shuffle [hudi]
Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on code in PR #11757:
URL: https://github.com/apache/hudi/pull/11757#discussion_r1714491728
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/utils/Pipelines.java:
##########
@@ -415,9 +415,7 @@ public static DataStreamSink<CompactionCommitEvent> compact(Configuration conf,
new CompactionPlanOperator(conf))
.setParallelism(1) // plan generate must be singleton
.setMaxParallelism(1)
- // make the distribution strategy deterministic to avoid concurrent modifications
- // on the same bucket files
- .keyBy(plan -> plan.getOperation().getFileGroupId().getFileId())
+ .rebalance()
Review Comment:
Is `rebanlance` deterministic for multiple concurrent tasks, when there are task failover and retries, two task may has the risk of sharing a common compaction file group.
--
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] [MINOR] improve comaction operator shuffle [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #11757:
URL: https://github.com/apache/hudi/pull/11757#issuecomment-2283669033
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "ec36c193519719981274a1057610e581ef6583aa",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=25117",
"triggerID" : "ec36c193519719981274a1057610e581ef6583aa",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* ec36c193519719981274a1057610e581ef6583aa Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=25117)
<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] [MINOR] improve comaction operator shuffle [hudi]
Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 merged PR #11757:
URL: https://github.com/apache/hudi/pull/11757
--
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] [MINOR] improve comaction operator shuffle [hudi]
Posted by "xicm (via GitHub)" <gi...@apache.org>.
xicm commented on code in PR #11757:
URL: https://github.com/apache/hudi/pull/11757#discussion_r1715058982
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/utils/Pipelines.java:
##########
@@ -415,9 +415,7 @@ public static DataStreamSink<CompactionCommitEvent> compact(Configuration conf,
new CompactionPlanOperator(conf))
.setParallelism(1) // plan generate must be singleton
.setMaxParallelism(1)
- // make the distribution strategy deterministic to avoid concurrent modifications
- // on the same bucket files
- .keyBy(plan -> plan.getOperation().getFileGroupId().getFileId())
+ .rebalance()
Review Comment:
Offline conpaction uses rebalance.
--
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] [MINOR] improve comaction operator shuffle [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #11757:
URL: https://github.com/apache/hudi/pull/11757#issuecomment-2285462573
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "ec36c193519719981274a1057610e581ef6583aa",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=25117",
"triggerID" : "ec36c193519719981274a1057610e581ef6583aa",
"triggerType" : "PUSH"
}, {
"hash" : "039fbc7590ce8c4f6052b11c4b682affd1d85fac",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "039fbc7590ce8c4f6052b11c4b682affd1d85fac",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* ec36c193519719981274a1057610e581ef6583aa Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=25117)
* 039fbc7590ce8c4f6052b11c4b682affd1d85fac 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] [MINOR] improve comaction operator shuffle [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #11757:
URL: https://github.com/apache/hudi/pull/11757#issuecomment-2285597316
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "ec36c193519719981274a1057610e581ef6583aa",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=25117",
"triggerID" : "ec36c193519719981274a1057610e581ef6583aa",
"triggerType" : "PUSH"
}, {
"hash" : "039fbc7590ce8c4f6052b11c4b682affd1d85fac",
"status" : "PENDING",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=22",
"triggerID" : "039fbc7590ce8c4f6052b11c4b682affd1d85fac",
"triggerType" : "PUSH"
}, {
"hash" : "039fbc7590ce8c4f6052b11c4b682affd1d85fac",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=19",
"triggerID" : "039fbc7590ce8c4f6052b11c4b682affd1d85fac",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 039fbc7590ce8c4f6052b11c4b682affd1d85fac Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=22) Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=19)
<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] [MINOR] improve comaction operator shuffle [hudi]
Posted by "xicm (via GitHub)" <gi...@apache.org>.
xicm commented on code in PR #11757:
URL: https://github.com/apache/hudi/pull/11757#discussion_r1715031083
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/utils/Pipelines.java:
##########
@@ -415,9 +415,7 @@ public static DataStreamSink<CompactionCommitEvent> compact(Configuration conf,
new CompactionPlanOperator(conf))
.setParallelism(1) // plan generate must be singleton
.setMaxParallelism(1)
- // make the distribution strategy deterministic to avoid concurrent modifications
- // on the same bucket files
- .keyBy(plan -> plan.getOperation().getFileGroupId().getFileId())
+ .rebalance()
Review Comment:
I tested on my cluster. But I didn't test the failed and retry case.
--
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] [MINOR] improve comaction operator shuffle [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #11757:
URL: https://github.com/apache/hudi/pull/11757#issuecomment-2283559310
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "ec36c193519719981274a1057610e581ef6583aa",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=25117",
"triggerID" : "ec36c193519719981274a1057610e581ef6583aa",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* ec36c193519719981274a1057610e581ef6583aa Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=25117)
<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] [MINOR] improve comaction operator shuffle [hudi]
Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on code in PR #11757:
URL: https://github.com/apache/hudi/pull/11757#discussion_r1715018571
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/utils/Pipelines.java:
##########
@@ -415,9 +415,7 @@ public static DataStreamSink<CompactionCommitEvent> compact(Configuration conf,
new CompactionPlanOperator(conf))
.setParallelism(1) // plan generate must be singleton
.setMaxParallelism(1)
- // make the distribution strategy deterministic to avoid concurrent modifications
- // on the same bucket files
- .keyBy(plan -> plan.getOperation().getFileGroupId().getFileId())
+ .rebalance()
Review Comment:
Did you test it offline already?
--
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] [MINNOR] improve comaction operator shuffle [hudi]
Posted by "xicm (via GitHub)" <gi...@apache.org>.
xicm commented on code in PR #11757:
URL: https://github.com/apache/hudi/pull/11757#discussion_r1713443105
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/utils/Pipelines.java:
##########
@@ -415,9 +415,7 @@ public static DataStreamSink<CompactionCommitEvent> compact(Configuration conf,
new CompactionPlanOperator(conf))
.setParallelism(1) // plan generate must be singleton
.setMaxParallelism(1)
- // make the distribution strategy deterministic to avoid concurrent modifications
- // on the same bucket files
- .keyBy(plan -> plan.getOperation().getFileGroupId().getFileId())
+ .rebalance()
Review Comment:
One operator one file group, rebalance is ok.
This is what we do in HoodieFlinkCompactor
https://github.com/apache/hudi/blob/b7e11b1d018e07aa85bf7de49c05bc2ccb71262d/hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/compact/HoodieFlinkCompactor.java#L289-L303
--
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] [MINOR] improve comaction operator shuffle [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #11757:
URL: https://github.com/apache/hudi/pull/11757#issuecomment-2285519711
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "ec36c193519719981274a1057610e581ef6583aa",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=25117",
"triggerID" : "ec36c193519719981274a1057610e581ef6583aa",
"triggerType" : "PUSH"
}, {
"hash" : "039fbc7590ce8c4f6052b11c4b682affd1d85fac",
"status" : "PENDING",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=22",
"triggerID" : "039fbc7590ce8c4f6052b11c4b682affd1d85fac",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* ec36c193519719981274a1057610e581ef6583aa Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=25117)
* 039fbc7590ce8c4f6052b11c4b682affd1d85fac Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=22)
<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