-
Notifications
You must be signed in to change notification settings - Fork 28
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
Open
Eistern
wants to merge
7
commits into
ydb-platform:master
Choose a base branch
from
Eistern:feature/alert-topic-auto-partitioning
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Implement SDK support for Topic Auto-Partitioning Settings #476
Eistern
wants to merge
7
commits into
ydb-platform:master
from
Eistern:feature/alert-topic-auto-partitioning
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
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
TopicDescription
returned bydescribeTopic
.Key Changes:
Auto-Partitioning Configuration:
AutoPartitioningStrategy
enum (DISABLED
,SCALE_UP
,SCALE_UP_AND_DOWN
,PAUSED
) to define the auto-partitioning behavior.AutoPartitioningWriteStrategySettings
(forcreateTopic
anddescribeTopic
) andAlterAutoPartitioningWriteStrategySettings
(foralterTopic
) to manage:stabilizationWindow
upUtilizationPercent
downUtilizationPercent
PartitioningSettings
andAlterPartitioningSettings
respectively.SDK Method Updates:
createTopic
: Can now specify initial auto-partitioning settings viaCreateTopicSettings
->PartitioningSettings
.alterTopic
: Can now modify auto-partitioning settings viaAlterTopicSettings
->AlterPartitioningSettings
.AlterAutoPartitioningWriteStrategySettings
allows for partial updates (e.g., changing only the stabilization window).describeTopic
:TopicDescription
now includes the currently configured auto-partitioning strategy and write strategy settings.New Classes:
tech.ydb.topic.settings.AutoPartitioningStrategy
tech.ydb.topic.settings.AutoPartitioningWriteStrategySettings
tech.ydb.topic.settings.AlterAutoPartitioningWriteStrategySettings
Refactoring & 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_alterTopicWithAutoPartitioning
to verify thealterTopic
functionality with new auto-partitioning settings.@Ignore
as the auto-partitioning feature viaalterTopic
requires YDB server version 25.1 or newer.msg.commit().join()
)