brianloss commented on a change in pull request #1891:
URL: https://github.com/apache/accumulo/pull/1891#discussion_r567317094
##########
File path: server/manager/src/main/java/org/apache/accumulo/master/Master.java
##########
@@ -1686,4 +1741,56 @@ public boolean isActiveService() {
return masterInitialized.get();
}
+ @SuppressWarnings("deprecation")
+ void initializeBalancer() {
+
+ // Try to initialize the defined balancer as the updated TabletBalancer
class first. If that
+ // fails with a ClassCastException, it means the property is specified as
the deprecated
+ // balancer type, so initialize it instead. If we still end up with no
balancer, then use
+ // DefaultLoadBalancer.
+ try {
+ tabletBalancer =
Property.createInstanceFromPropertyName(getConfiguration(),
+ Property.TABLE_LOAD_BALANCER, TabletBalancer.class, null);
+ } catch (ClassCastException e) {
+ // ignore -- this means that the deprecated balancer type was used
Review comment:
The try/catch will go away when I finish changing the old TabletBalancer
to implement the new SPI balancer interface.
----------------------------------------------------------------
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]