keith-turner commented on code in PR #3496:
URL: https://github.com/apache/accumulo/pull/3496#discussion_r1258902810
##########
core/src/main/java/org/apache/accumulo/core/spi/balancer/TabletBalancer.java:
##########
@@ -138,4 +133,15 @@ interface BalanceParameters {
* @return the time, in milliseconds, to wait before re-balancing.
*/
long balance(BalanceParameters params);
+
+ /**
+ * Ask the balancer if the tablet is hosted by a TabletServer in the defined
resource group
+ *
+ * @return true if TabletServer is in the configured resource group, false
otherwise
+ * @since 4.0.0
+ */
+ default boolean isHostedInResourceGroup(Configuration conf, TabletServerId
currentLocation,
+ Map<String,Set<TabletServerId>> currentTServerGrouping) {
+ return true;
+ }
Review Comment:
This method should be passed a tablet. Also conf is probably not needed,
that is passed into init and can be kept by the plugin if desired.
Instead of asking if something is in the correct resource group, could we
instead ask the balancer what a tablets desired resource group is?
```suggestion
/**
* @return the name of the tablet server resource group the balancer would
like to see this tablet in
* @since 4.0.0
*/
default String getDesiredResourceGroup(TabletId tablet) {
return default constant;
}
```
--
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]