infraio commented on a change in pull request #1243: HBASE-23944 The method
setClusterLoad of SimpleLoadBalancer is incorr…
URL: https://github.com/apache/hbase/pull/1243#discussion_r388758950
##########
File path:
hbase-server/src/test/java/org/apache/hadoop/hbase/master/balancer/TestDefaultLoadBalancer.java
##########
@@ -171,20 +171,33 @@ public void testBalanceClusterOverall() throws Exception
{
*/
@Test
public void testImpactOfBalanceClusterOverall() throws Exception {
+ testImpactOfBalanceClusterOverall(false);
+ }
+
+ @Test
+ public void testImpactOfBalanceClusterOverallWithTableClusterLoad() throws
Exception {
+ testImpactOfBalanceClusterOverall(true);
+ }
+
+ private void testImpactOfBalanceClusterOverall(boolean useTableClusterLoad)
throws Exception {
Map<TableName, Map<ServerName, List<RegionInfo>>> clusterLoad = new
TreeMap<>();
Map<ServerName, List<RegionInfo>> clusterServers =
mockUniformClusterServers(mockUniformCluster);
List<ServerAndLoad> clusterList = convertToList(clusterServers);
clusterLoad.put(TableName.valueOf(name.getMethodName()), clusterServers);
// use overall can achieve both table and cluster level balance
- HashMap<TableName, TreeMap<ServerName, List<RegionInfo>>> result1 =
mockClusterServersWithTables(clusterServers);
- loadBalancer.setClusterLoad(clusterLoad);
+ Map<TableName, Map<ServerName, List<RegionInfo>>> result1 =
mockClusterServersWithTables(clusterServers);
Review comment:
The difference of results1 and clusterLoad is?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services