Change getBaselineAasignment/getBestPossibleAssignment to account for partial-WAGED clusters#1167
Merged
jiajunwang merged 4 commits intoapache:masterfrom Jul 23, 2020
Conversation
added 2 commits
July 21, 2020 13:56
jiajunwang
reviewed
Jul 22, 2020
Contributor
jiajunwang
left a comment
There was a problem hiding this comment.
Please do the same for getBestPossibleAssignment too.
helix-core/src/main/java/org/apache/helix/controller/rebalancer/waged/WagedRebalancer.java
Outdated
Show resolved
Hide resolved
helix-core/src/main/java/org/apache/helix/controller/rebalancer/waged/WagedRebalancer.java
Outdated
Show resolved
Hide resolved
helix-core/src/main/java/org/apache/helix/controller/rebalancer/waged/WagedRebalancer.java
Outdated
Show resolved
Hide resolved
helix-core/src/main/java/org/apache/helix/controller/rebalancer/waged/WagedRebalancer.java
Outdated
Show resolved
Hide resolved
jiajunwang
reviewed
Jul 22, 2020
Contributor
jiajunwang
left a comment
There was a problem hiding this comment.
Let's add a test case to cover this scenario.
Contributor
Author
|
This PR is ready to be merged, approved by @jiajunwang Change getBaselineAasignment/getBestPossibleAssignment to account for partial-WAGED clustersThe logics are now changed to a per resource level. If a resource has baseline/best possible, the baseline/best possible will be used; else, the current state will be used. |
kaisun2000
pushed a commit
to kaisun2000/helix
that referenced
this pull request
Jul 29, 2020
… partial-WAGED clusters (apache#1167) The logics are now changed to a per resource level. If a resource has baseline/best possible, the baseline/best possible will be used; else, the current state will be used. Co-authored-by: Neal Sun <nesun@nesun-mn1.linkedin.biz>
huizhilu
pushed a commit
to huizhilu/helix
that referenced
this pull request
Aug 16, 2020
… partial-WAGED clusters (apache#1167) The logics are now changed to a per resource level. If a resource has baseline/best possible, the baseline/best possible will be used; else, the current state will be used. Co-authored-by: Neal Sun <nesun@nesun-mn1.linkedin.biz>
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
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.
Issues
Fixes #1166
Description
The following tests are written for this issue:
testPartialBaselineAvailability
Here are some details about my PR, including screenshots of any UI changes:
WAGED Rebalancer by design only supports one-off migration of resources. As a result, its
getBaselineAssignment()did not consider the case of a cluster that's partially managed by WAGED. It tries to get baselines for all resources from the cluster; if there's no baseline data, it gets current states for all resources as a fallback. It doesn't care for resources that don't have baseline while other resources have baselines - when that's the case, the resources that don't have baseline will not fallback to their current states; they will simply not have baselines. A similar problem happens togetBestPossibleAssignment().The logic is now changed to a per resource level. If a resource has baseline, the baseline will be used; else, the current state will be used.
getBestPossibleAssignment()will be fixed the same way.Tests
Rerun
Commits
Code Quality
(helix-style-intellij.xml if IntelliJ IDE is used)