-
Notifications
You must be signed in to change notification settings - Fork 31
Implement SDK support for Topic Auto-Partitioning Settings #476
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
Merged
alex268
merged 7 commits into
ydb-platform:master
from
Eistern:feature/alert-topic-auto-partitioning
May 12, 2025
Merged
Implement SDK support for Topic Auto-Partitioning Settings #476
alex268
merged 7 commits into
ydb-platform:master
from
Eistern:feature/alert-topic-auto-partitioning
May 12, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add equals implementations for topic description classes
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #476 +/- ##
============================================
- Coverage 58.76% 58.72% -0.04%
- Complexity 2170 2179 +9
============================================
Files 320 323 +3
Lines 12942 13063 +121
Branches 1269 1278 +9
============================================
+ Hits 7605 7671 +66
- Misses 4720 4769 +49
- Partials 617 623 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Eistern
commented
May 7, 2025
|
Dropped |
alex268
approved these changes
May 7, 2025
pnv1
approved these changes
May 12, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces support for configuring and describing auto-partitioning settings for YDB topics within the Java SDK. Users can now define the auto-partitioning strategy and its associated parameters (stabilization window, utilization thresholds) when creating or altering topics. These settings are also reflected in the
TopicDescriptionreturned bydescribeTopic.Key Changes:
Auto-Partitioning Configuration:
AutoPartitioningStrategyenum (DISABLED,SCALE_UP,SCALE_UP_AND_DOWN,PAUSED) to define the auto-partitioning behavior.AutoPartitioningWriteStrategySettings(forcreateTopicanddescribeTopic) andAlterAutoPartitioningWriteStrategySettings(foralterTopic) to manage:stabilizationWindowupUtilizationPercentdownUtilizationPercentPartitioningSettingsandAlterPartitioningSettingsrespectively.SDK Method Updates:
createTopic: Can now specify initial auto-partitioning settings viaCreateTopicSettings->PartitioningSettings.alterTopic: Can now modify auto-partitioning settings viaAlterTopicSettings->AlterPartitioningSettings.AlterAutoPartitioningWriteStrategySettingsallows for partial updates (e.g., changing only the stabilization window).describeTopic:TopicDescriptionnow includes the currently configured auto-partitioning strategy and write strategy settings.New Classes:
tech.ydb.topic.settings.AutoPartitioningStrategytech.ydb.topic.settings.AutoPartitioningWriteStrategySettingstech.ydb.topic.settings.AlterAutoPartitioningWriteStrategySettingsRefactoring & Improvements:
equals()andhashCode()methods for various topic description classes (TopicDescription,PartitioningSettings,Consumer,ConsumerDescription,ConsumerPartitionInfo,MultipleWindowsStat,PartitionInfo,PartitionStats,SupportedCodecs,TopicStats,OffsetsRangeImpl) to improve data integrity and simplify comparisons, particularly in tests.Testing:
step07_alterTopicWithAutoPartitioningto verify thealterTopicfunctionality with new auto-partitioning settings.@Ignoreas the auto-partitioning feature viaalterTopicrequires YDB server version 25.1 or newer.msg.commit().join())