Changing the Number of Buckets
Notes and Constraints
This section applies only to MRS 3.6.0-LTS.1 and later.
Function
If a Hudi table uses an inappropriate number of buckets due to significant changes in data volume, and you cannot rebuild the table, use this command to adjust the bucket count for a specific partition.
Syntax
View the number of buckets in a specified partition.
call show_bucket_num(table => '${tableName}', partition => '${partitionPath}') Change the number of buckets for a specific partition.
call change_bucket_num(table => '${tableName}', partition => '${partitionPath}', bucketNum => '${newBucketNumber }') Parameter Description
| Parameter | Description | Mandatory |
|---|---|---|
| tableName | Hudi table name. Database name.Table name is also supported. The value is a string. | Yes |
| partitionPath | Partition path. The value is a string.
| No |
| newBucketNumber | New bucket number. The value is an integer. HetuEngine does not support primary key-based equality queries on Hudi tables that have modified bucket counts. | Yes |
Example
View the number of buckets in a specified partition.
call show_bucket_num(table => 'hudi_table', partition => 'par=1')
Change the number of buckets for a specific partition.
call change_bucket_num(table => "hudi_table", partition => 'par=1', bucketNum => '3')
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot