-
Couldn't load subscription status.
- Fork 2.3k
Add cluster primary balance contraint for rebalancing with buffer #12656
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
gbbafna
merged 22 commits into
opensearch-project:main
from
alchemist51:primary-rebalacing
Apr 2, 2024
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
8aed71b
Add cluster primary balance contraint for rebalancing with buffer
alchemist51 a2eaddd
Fix spotless check
alchemist51 761adc3
Tuning constraints
alchemist51 f842b41
Fix the spotless checks
alchemist51 55ed855
Add random allocation strategy
alchemist51 32df4e6
Fix spotless errors
alchemist51 938ac4d
Testing the allocation changes for all tests
alchemist51 6cda5cd
Enable the prefer_primary to true
alchemist51 ece3b26
Add changelog.md
alchemist51 80dbcb9
Fix from main upsteam
alchemist51 3d4d865
Add UTs
alchemist51 d7657af
Fix spotless check
alchemist51 566c7ef
Fix UTs
alchemist51 0ca76bf
refactoring code
alchemist51 b32f3bf
Merge branch 'main' of github.com:opensearch-project/OpenSearch into …
alchemist51 462f286
address comments
alchemist51 60ccd7b
Merge branch 'main' of github.com:opensearch-project/OpenSearch into …
alchemist51 c2baa39
Address comments
alchemist51 0f9edb0
Merge branch 'main' of github.com:opensearch-project/OpenSearch into …
alchemist51 b28f5e8
Address the comments
alchemist51 e823b85
Merge branch 'main' of github.com:opensearch-project/OpenSearch into …
alchemist51 9f94ba5
Merge branch 'main' into primary-rebalacing
alchemist51 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
24 changes: 24 additions & 0 deletions
24
server/src/main/java/org/opensearch/cluster/routing/allocation/RebalanceParameter.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| /* | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| * | ||
| * The OpenSearch Contributors require contributions made to | ||
| * this file be licensed under the Apache-2.0 license or a | ||
| * compatible open source license. | ||
| */ | ||
|
|
||
| package org.opensearch.cluster.routing.allocation; | ||
|
|
||
| /** | ||
| * RebalanceConstraint Params | ||
| */ | ||
| public class RebalanceParameter { | ||
| private float preferPrimaryBalanceBuffer; | ||
|
|
||
| public RebalanceParameter(float preferPrimaryBalanceBuffer) { | ||
| this.preferPrimaryBalanceBuffer = preferPrimaryBalanceBuffer; | ||
| } | ||
|
|
||
| public float getPreferPrimaryBalanceBuffer() { | ||
| return preferPrimaryBalanceBuffer; | ||
| } | ||
| } |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.