Skip to content
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

[Feature Discuss] Partition-Level Bucket Index #12699

Open
zhangyue19921010 opened this issue Jan 24, 2025 · 2 comments
Open

[Feature Discuss] Partition-Level Bucket Index #12699

zhangyue19921010 opened this issue Jan 24, 2025 · 2 comments

Comments

@zhangyue19921010
Copy link
Contributor

zhangyue19921010 commented Jan 24, 2025

Hi Hudis:

As we known, Hudi proposed and introduced Bucket Index in RFC-29. Bucket Index can well unify the indexes of Flink and Spark, that is, Spark and Flink could upsert the same Hudi table using bucket index.

However, Bucket Index has a limit of fixed number of buckets. In order to solve this problem, RFC-42 proposed the ability of consistent hashing achieving bucket resizing by splitting or merging several local buckets dynamically.

But from PRD experience, sometimes a Partition-Level Bucket Index and a offline way to do bucket rescale is good enough without introducing additional efforts (multiple writes, clustering, automatic resizing,etc.). Because the more complex the Architecture, the more error-prone it is and the greater operation and maintenance pressure.

In this regard, we could upgrade the traditional Bucket Index to implement a Partition-Level Bucket Index, so that users can set a specific number of buckets for different partitions through a rule engine (such as regular expression matching). On the other hand, for a certain existing partitions, an off-line command is provided to reorganized the data using insert overwrite(need to stop the data writing of the current partition).

More importantly, the existing Bucket Index table can be upgraded to Partition-Level Bucket Index smoothly and seamlessly.

Some thoughts on this change? Any feedback would be greatly appreciated !

@danny0405
Copy link
Contributor

Are you saying to support configuring the bucket number in partition-level? Can the bucket number be changed after an explicit configuration?

@zhangyue19921010
Copy link
Contributor Author

zhangyue19921010 commented Jan 30, 2025

Are you saying to support configuring the bucket number in partition-level? Can the bucket number be changed after an explicit configuration?

Hi @danny0405

Thanks for your attention. Yes, we will provide a new mechanism to specify the number of buckets for different partitions through an expression. For existing partitions, we can change current partition's bucket number through an offline job (Insert Overwrite) with the new bucket number. For new partitions, the initial value of the bucket number is obtained based on the expression. Additionally, updates to the expression are also supported, but the updated expression will only take effect for new partitions.

Function similar to https://paimon.apache.org/docs/master/maintenance/rescale-bucket/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Awaiting Triage
Development

No branches or pull requests

2 participants