[
https://issues.apache.org/jira/browse/HBASE-10127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13846051#comment-13846051
]
cuijianwei commented on HBASE-10127:
------------------------------------
Thanks for your comments [~jmspaggi] and [~eclark]. I go through the
implementation of 'balance()' in trunk. The 'getAssignmentByTable()' has been
moved to RegionStates. The current implementation also includes the following
logic:
{code}
synchronized (this) {
if
(!server.getConfiguration().getBoolean("hbase.master.loadbalance.bytable",
false)) {
Map<ServerName, List<HRegionInfo>> svrToRegions =
new HashMap<ServerName, List<HRegionInfo>>(serverHoldings.size());
for (Map.Entry<ServerName, Set<HRegionInfo>> e:
serverHoldings.entrySet()) {
svrToRegions.put(e.getKey(), new
ArrayList<HRegionInfo>(e.getValue()));
}
result.put(TableName.valueOf("ensemble"), svrToRegions);
} else {
{code}
It seems 'hbase.master.loadbalance.bytable' will decide whether regions can be
returned by table? Will this logic be removed soon? [~eclark], as you
mentioned, the balancer hasn't done the job well when doing table balancing, is
there any jira issue discuss this problem? Thanks.
> support balance table
> ---------------------
>
> Key: HBASE-10127
> URL: https://issues.apache.org/jira/browse/HBASE-10127
> Project: HBase
> Issue Type: Improvement
> Components: master, shell
> Affects Versions: 0.94.14
> Reporter: cuijianwei
> Attachments: HBASE-10127-0.94-v1.patch
>
>
> HMaster provides a rpc interface : 'balance()' to balance all the regions
> among region servers in the cluster. Sometimes, we might want to balance all
> the regions belonging to a table while keeping the region assignments of
> other tables. This demand may reveal in a shared cluster where we want to
> balance regions for one application's table without affecting other
> applications. Therefore, will it be useful if we extend the current
> 'balance()' interface to only balance regions of the same table?
--
This message was sent by Atlassian JIRA
(v6.1.4#6159)