You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "zhangyue19921010 (via GitHub)" <gi...@apache.org> on 2024/12/09 03:34:54 UTC
[PR] [HUDI-8675] Flink schedule compaction with incremental partitions [hudi]
zhangyue19921010 opened a new pull request, #12448:
URL: https://github.com/apache/hudi/pull/12448
### Change Logs
In Hudi, when scheduling Compaction, the default behavior is to scan all partitions under the current table. When there are many historical partitions, such as 640,000 in our production environment, this scanning and planning operation becomes very inefficient. For Flink, it often leads to checkpoint timeouts, resulting in data delays. This PR introduces the ability to schedule Compaction for incremental partitions. In the StreamOperatorCoordinator, it adds:
1. A state variable `lastInstant` to record the delta commit instant corresponding to the last successfully completed Compaction schedule, and it is saved with the state.
2. A temporary variable `cacheWrittenPartitions` to cache the incremental partitions corresponding to all delta commits from the last scheduled Compaction to the present.
<img width="1494" alt="image" src="https://github.com/user-attachments/assets/2f7de73d-30ad-4411-ba08-28386ff549f4">
### 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] [HUDI-8675] Flink schedule compaction with incremental partitions [hudi]
Posted by "yuzhaojing (via GitHub)" <gi...@apache.org>.
yuzhaojing commented on PR #12448:
URL: https://github.com/apache/hudi/pull/12448#issuecomment-2527230012
This is a highly anticipated feature and a very important capability for improving the availability of Flink Hudi pipeline. I quite agree with @danny0405 proposal. I hope that the incremental capability can be applied to more scenarios instead of being limited to compaction only. I'm really looking forward to having an RFC to systematically solve these problems. Besides, here are some thoughts:
1. For NBCC, is it possible that some partitions may be missed in this implementation?
2. If the lastInstant has already been archived and there is no judgment made when initializing cache partitions (initCachePartitions), will there be a situation where some partitions are missed?
--
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] [HUDI-8675] Flink schedule compaction with incremental partitions [hudi]
Posted by "zhangyue19921010 (via GitHub)" <gi...@apache.org>.
zhangyue19921010 closed pull request #12448: [HUDI-8675] Flink schedule compaction with incremental partitions
URL: https://github.com/apache/hudi/pull/12448
--
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] [HUDI-8675] Flink schedule compaction with incremental partitions [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #12448:
URL: https://github.com/apache/hudi/pull/12448#issuecomment-2526851171
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "e18fc63d42e843fbcc4f304821dadff1d4400a3e",
"status" : "PENDING",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=2328",
"triggerID" : "e18fc63d42e843fbcc4f304821dadff1d4400a3e",
"triggerType" : "PUSH"
}, {
"hash" : "fc67ac2ef03544a76b5c6da8c497a65a512a8f1d",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "fc67ac2ef03544a76b5c6da8c497a65a512a8f1d",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* e18fc63d42e843fbcc4f304821dadff1d4400a3e Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=2328)
* fc67ac2ef03544a76b5c6da8c497a65a512a8f1d 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] [HUDI-8675] Flink schedule compaction with incremental partitions [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #12448:
URL: https://github.com/apache/hudi/pull/12448#issuecomment-2527008421
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "e18fc63d42e843fbcc4f304821dadff1d4400a3e",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=2328",
"triggerID" : "e18fc63d42e843fbcc4f304821dadff1d4400a3e",
"triggerType" : "PUSH"
}, {
"hash" : "fc67ac2ef03544a76b5c6da8c497a65a512a8f1d",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=2329",
"triggerID" : "fc67ac2ef03544a76b5c6da8c497a65a512a8f1d",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* fc67ac2ef03544a76b5c6da8c497a65a512a8f1d Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=2329)
<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] [HUDI-8675] Flink schedule compaction with incremental partitions [hudi]
Posted by "zhangyue19921010 (via GitHub)" <gi...@apache.org>.
zhangyue19921010 commented on PR #12448:
URL: https://github.com/apache/hudi/pull/12448#issuecomment-2550550567
Hey @danny0405 and @yuzhaojing , Incremental table service related PR
--
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] [HUDI-8675] Flink schedule compaction with incremental partitions [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #12448:
URL: https://github.com/apache/hudi/pull/12448#issuecomment-2526781249
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "e18fc63d42e843fbcc4f304821dadff1d4400a3e",
"status" : "PENDING",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=2328",
"triggerID" : "e18fc63d42e843fbcc4f304821dadff1d4400a3e",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* e18fc63d42e843fbcc4f304821dadff1d4400a3e Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=2328)
<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] [HUDI-8675] Flink schedule compaction with incremental partitions [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #12448:
URL: https://github.com/apache/hudi/pull/12448#issuecomment-2526775548
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "e18fc63d42e843fbcc4f304821dadff1d4400a3e",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "e18fc63d42e843fbcc4f304821dadff1d4400a3e",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* e18fc63d42e843fbcc4f304821dadff1d4400a3e 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] [HUDI-8675] Flink schedule compaction with incremental partitions [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #12448:
URL: https://github.com/apache/hudi/pull/12448#issuecomment-2526852630
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "e18fc63d42e843fbcc4f304821dadff1d4400a3e",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=2328",
"triggerID" : "e18fc63d42e843fbcc4f304821dadff1d4400a3e",
"triggerType" : "PUSH"
}, {
"hash" : "fc67ac2ef03544a76b5c6da8c497a65a512a8f1d",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "fc67ac2ef03544a76b5c6da8c497a65a512a8f1d",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* e18fc63d42e843fbcc4f304821dadff1d4400a3e Azure: [CANCELED](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=2328)
* fc67ac2ef03544a76b5c6da8c497a65a512a8f1d 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] [HUDI-8675] Flink schedule compaction with incremental partitions [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #12448:
URL: https://github.com/apache/hudi/pull/12448#issuecomment-2526874189
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "e18fc63d42e843fbcc4f304821dadff1d4400a3e",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=2328",
"triggerID" : "e18fc63d42e843fbcc4f304821dadff1d4400a3e",
"triggerType" : "PUSH"
}, {
"hash" : "fc67ac2ef03544a76b5c6da8c497a65a512a8f1d",
"status" : "PENDING",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=2329",
"triggerID" : "fc67ac2ef03544a76b5c6da8c497a65a512a8f1d",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* e18fc63d42e843fbcc4f304821dadff1d4400a3e Azure: [CANCELED](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=2328)
* fc67ac2ef03544a76b5c6da8c497a65a512a8f1d Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=2329)
<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] [HUDI-8675] Flink schedule compaction with incremental partitions [hudi]
Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on PR #12448:
URL: https://github.com/apache/hudi/pull/12448#issuecomment-2527182857
Nice feature, the incremental compaction and clustering have always been a strong request from community users and they are valuable. I have some thoughts here:
1. we better generalize the incremental plan scheduling for both compaction and clustering;
2. try to avoid to relies on Flink state for the back-up of state-store, we might still utilities the timeline to fetch the incremental partitions added to the table like what we do to incremental cleaning;
3. if there is pending compaction in partition `p1`, and the `p1` has been written into new logs since last compaction, how can we continue to schedule the plan for `p1` for next compaction scheduling run?
4. we need to consider whether to design a new interface for incremental compaction planning, previously we pass around all the table partiitons to `CompactionStrategy.filterPartitionPaths`.
It's great if we can fire a RFC to address these issues.
--
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] [HUDI-8675] Flink schedule compaction with incremental partitions [hudi]
Posted by "zhangyue19921010 (via GitHub)" <gi...@apache.org>.
zhangyue19921010 commented on PR #12448:
URL: https://github.com/apache/hudi/pull/12448#issuecomment-2527532743
Thanks For your attention @danny0405 AND @yuzhaojing,Will address a RFC implement incremental capability for all Hudi table service like compaction, clustering and clean, etc. I'll let you know when the RFC has a draft :)
--
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