[
https://issues.apache.org/jira/browse/HBASE-25183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17214363#comment-17214363
]
Duo Zhang commented on HBASE-25183:
-----------------------------------
{quote}
The current module dependency has it that balancer depends on client but not on
server. How are we to have a smart balancer that only has client access but no
access to info only the Master knows? This seems incorrect to me.
{quote}
Let me explain more about this. The old design of the balancer has a great
decision is to not do assign inside the balancer implementation, instead, we
will return RegionPlan to let the upper layer do the final region move work.
This means, you can define the balancer implementation as 'algorithm', which
does not need to be involved into the fencing problem or to deal with
assignment failures, they are the duty of AssignmentManager, not balancer.
So in general, AssignmentManager is what you said, need to be deeply tied
together with master, but for balancer, it is just for 'algorithm'. We can
abstract an interface which is used by balancer to get the information of the
cluster, and then calculate the RegionPlan. You can see the PR for HBASE-25184,
regard less why RegionLocationFinder is in balancer(will answer it in
HBASE-25184), please see the BalancerService interface, this is what I want to
put more methods into, to decouple the balancer algorithm with master.
HBASE-23933 is just a beginning, where we create the hbase-balancer module, and
move the classes which can be moved without modification to the new module. And
in this issue, we will do more refactoring work to move more balancer related
classes to hbase-balancer, and what is more important, also move the UTs to the
new module.
So in general, I think the PR you created in HBASE-25185 is not my plan, where
you move code back to hbase-server, and even a new module which depends on
hbase-server. But anyway, favored node balancer is a bit nasty that it depends
a lot on master stuff.
For stochastic balancer, I checked the code, it does not depend on master a
lot, usually we only do a null check to avoid balancing without masterService
available, so I think it is easy to move stochastic balancer to hbase-balancer
module.
Thanks.
> Move more balancer related classes to hbase-balancer
> ----------------------------------------------------
>
> Key: HBASE-25183
> URL: https://issues.apache.org/jira/browse/HBASE-25183
> Project: HBase
> Issue Type: Umbrella
> Components: Balancer
> Reporter: Duo Zhang
> Priority: Major
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)