keith-turner commented on code in PR #5492:
URL: https://github.com/apache/accumulo/pull/5492#discussion_r2053100611


##########
core/src/test/java/org/apache/accumulo/core/spi/balancer/HostRegexTableLoadBalancerTest.java:
##########
@@ -201,6 +201,70 @@ public void testSplitCurrentByRegexUsingHostname() {
         defHosts.containsKey(new TabletServerIdImpl("192.168.0.15", 9997, 
Integer.toHexString(1))));
   }
 
+  @Test
+  public void testSplitCurrentByRegexDefineDefaultPool() {
+    HashMap<String,String> props = new HashMap<>(DEFAULT_TABLE_PROPERTIES);
+    props.put(HostRegexTableLoadBalancer.HOST_BALANCER_PREFIX + 
FOO.getTableName(), "r01.*");
+    props.put(HostRegexTableLoadBalancer.HOST_BALANCER_PREFIX + 
BAR.getTableName(), "r02.*");
+    // Normally the DEFAULT pool would be comprised of the hosts not included 
in a regex.
+    // Here we are going to define it as also being on rack1
+    props.put(HostRegexTableLoadBalancer.HOST_BALANCER_PREFIX + DEFAULT_POOL, 
"r01.*");

Review Comment:
   Another possible test could be a set of hosts that do not overlap, like the 
following.  
   
   ```
       props.put(HostRegexTableLoadBalancer.HOST_BALANCER_PREFIX + 
FOO.getTableName(), "r01.*");
       props.put(HostRegexTableLoadBalancer.HOST_BALANCER_PREFIX + 
BAR.getTableName(), "r02.*");
       props.put(HostRegexTableLoadBalancer.HOST_BALANCER_PREFIX + 
DEFAULT_POOL, "r03.*");
   ```
   
   This tests when the regex for the default pool overlaps with the host not 
included in FOO and BAR.



-- 
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.

To unsubscribe, e-mail: notifications-unsubscr...@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to