brianloss opened a new pull request #1891:
URL: https://github.com/apache/accumulo/pull/1891
This change deprecates existing balancers and introduces copies of each
under the SPI package. The main balancer interface, TabletBalancer, has
been converted from an abstract class to an interface and its method
signatures use only public API types, and some other data types in SPI
sub-packages. The new types used expose the same functionality as the
previous types, and the implementations generally simply wrap the old
thrift objects and delegate, but will allow for easier evolution of the
API in the future.
* Deprecated TabletId.getTableId(), which created a new Text object
every time, in favor of new TabletId.getTable() which returns a
TableId. All existing usages of the getTableId() method would
immediately call toString() on the returned Text object, or construct
a TableId from the Text object. Therefore, the new method avoids
object creation and usages read cleaner in many cases.
* Add functionality to PluginEnvironment.Configuration for loadClass
(vs just instantiating a class) and also expose derived property
calculation (AccumuloConfiguration.Deriver) as a Supplier.
* Deprecated all balancers in org.apache.accumulo.server.master.balancer
except for ChaoticLoadBalancer, which was moved to accumulo-test since
its purpose is only for testing.
* Introduce types in org.apache.accumulo.core.spi.balancer.data for
wrapping thrift types needed by the balancers.
* Add a BalancerEnvironment to the SPI to support balancer-specific
system operations (table online status check, listing online tablets,
etc) in an API-stable manner.
* Convert TabletBalancer from abstract class to interface with init,
getAssignments, and balance methods. The methods take parameters
objects which will make it easier in the future if the balancer API
needs to evolve.
* Implement existing balancers (DefaultLoadBalancer, TableLoadBalancer,
GroupBalancer, RegexGroupBalancer, HostRegexTableLoadBalancer) in the
SPI package by copying existing code and converting usages of thrift
types to new stable types, and adjusting method signatures such that
the new TabletBalancer API is implemented.
* Changed default balancer and table load balancer properties to use the
new SPI-packaged versions.
* Wired support in Master to call either the deprecated or new balancer
depending on which type is specified by the accumulo configuration.
fixes #1880
----------------------------------------------------------------
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]