-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[LoadBalance] make BeLoadRebalancer extends from base class Rebalancer #4771
Conversation
fe/fe-core/src/main/java/org/apache/doris/clone/Rebalancer.java
Outdated
Show resolved
Hide resolved
fe/fe-core/src/main/java/org/apache/doris/clone/Rebalancer.java
Outdated
Show resolved
Hide resolved
fe/fe-core/src/main/java/org/apache/doris/clone/TabletScheduler.java
Outdated
Show resolved
Hide resolved
In Apache Druid. https://github.com/apache/druid/blob/master/server/src/main/java/org/apache/druid/server/coordinator/BalancerStrategy.java
I think the Apache Druid |
It's based on the specific strategies. Some strategies can delay choosing the dest be until create a clone task, but some
We want to import the kudu's rebalance strategy, it'll calculate a concrete move{partition id, src be, dest be}, so it's no need to separate into In Doris, rebalance has 2 steps:
The key point is, step 2 will generate another TabletSchedCtx , we can't know which replica is the replica we want to delete. So we should try to get it from rebalancer. |
@vagetablechicken Hi, I see what's your mean. I agree with your interface logic. But for the method naming, I think we would better rename it. For For |
I have a question about the problem described in #4763. If we implement a new LoadBalancer that allow users to specify a tablet to migrate from node A to node B. But after the migration is completed, how to ensure that this tablet will not be migrated back again by the default balance strategy? |
I think in one cluster, we could only enable one balance strategy? |
Yes, only one. |
fe/fe-core/src/main/java/org/apache/doris/clone/Rebalancer.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Proposed changes
Create a base class
Rebalancer
, support to delete the specified replica(actually add a new priority in handling redundant replica).The origin LoadBalancer, which will named as BeLoadRebalancer, just need to extend from Rebalancer without any logic change.
Types of changes
Checklist