keith-turner commented on code in PR #3603:
URL: https://github.com/apache/accumulo/pull/3603#discussion_r1261812676
##########
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())) {
Review Comment:
Pushing the resource group comparison inside the plugin makes the
interaction between Accumulo and plugin more generic. This allows different
impls, like the host reg ex balancer could possibly implement this method.
--
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]