Class RegexGroupBalancer

java.lang.Object
org.apache.accumulo.core.spi.balancer.GroupBalancer
org.apache.accumulo.core.spi.balancer.RegexGroupBalancer
All Implemented Interfaces:
TabletBalancer

public class RegexGroupBalancer extends GroupBalancer
A GroupBalancer that groups tablets using a configurable regex. To use this balancer configure the following settings for your table then configure this balancer for your table.
  • Set table.custom.balancer.group.regex.pattern to a regular expression. This regular expression must have one group. The regex is applied to the tablet end row and whatever the regex group matches is used as the group. For example with a regex of (\d\d).* and an end row of 12abc, the group for the tablet would be 12.
  • Set table.custom.balancer.group.regex.default to a default group. This group is returned for the last tablet in the table and tablets for which the regex does not match.
  • Optionally set table.custom.balancer.group.regex.wait.time to time (can use time suffixes). This determines how long to wait between balancing. Since this balancer scans the metadata table, may want to set this higher for large tables.
Since:
2.1.0
  • Field Details

    • REGEX_PROPERTY

      public static final String REGEX_PROPERTY
    • DEFAUT_GROUP_PROPERTY

      public static final String DEFAUT_GROUP_PROPERTY
    • WAIT_TIME_PROPERTY

      public static final String WAIT_TIME_PROPERTY
  • Constructor Details

    • RegexGroupBalancer

      public RegexGroupBalancer(TableId tableId)
  • Method Details