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


##########
core/src/main/java/org/apache/accumulo/core/spi/balancer/TableLoadBalancer.java:
##########
@@ -188,6 +188,22 @@ public void getAssignments(AssignmentParameters params) {
     }
   }
 
+  @Override
+  public boolean needsReassignment(CurrentAssignment currentAssignment) {
+    var tableId = currentAssignment.getTablet().getTable();
+    String value = 
environment.getConfiguration(tableId).get(TABLE_ASSIGNMENT_GROUP_PROPERTY);
+    String expectedGroup = (value == null || StringUtils.isEmpty(value))
+        ? Constants.DEFAULT_RESOURCE_GROUP_NAME : value;
+
+    if (!expectedGroup.equals(currentAssignment.getResourceGroup())) {
+      // The tablet is not in the expected resource group, so it needs to be 
reassigned
+      return true;
+    }
+
+    // defer to the per table balancer
+    return getBalancerForTable(tableId).needsReassignment(currentAssignment);

Review Comment:
   Calling down to the table balancer could possibly allow for a per table 
balancer that partitions tablets to groups of tservers.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to