Class RegexGroupBalancer
- java.lang.Object
-
- org.apache.accumulo.server.master.balancer.TabletBalancer
-
- org.apache.accumulo.server.master.balancer.GroupBalancer
-
- org.apache.accumulo.server.master.balancer.RegexGroupBalancer
-
- All Implemented Interfaces:
TabletBalancer
@Deprecated(since="2.1.0") public class RegexGroupBalancer extends GroupBalancer
Deprecated.since 2.1.0. UseRegexGroupBalancer
instead.AGroupBalancer
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 of12abc
, the group for the tablet would be12
. - 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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.accumulo.server.master.balancer.TabletBalancer
TabletBalancer.BalancerProblem, TabletBalancer.NoTservers, TabletBalancer.OutstandingMigrations
-
Nested classes/interfaces inherited from interface org.apache.accumulo.core.spi.balancer.TabletBalancer
TabletBalancer.AssignmentParameters, TabletBalancer.BalanceParameters
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAUT_GROUP_PROPERTY
Deprecated.static String
REGEX_PROPERTY
Deprecated.static String
WAIT_TIME_PROPERTY
Deprecated.-
Fields inherited from class org.apache.accumulo.server.master.balancer.TabletBalancer
context, TIME_BETWEEN_BALANCER_WARNINGS
-
-
Constructor Summary
Constructors Constructor Description RegexGroupBalancer(TableId tableId)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected Function<KeyExtent,String>
getPartitioner()
Deprecated.protected long
getWaitTime()
Deprecated.The amount of time to wait between balancing.-
Methods inherited from class org.apache.accumulo.server.master.balancer.GroupBalancer
balance, getAssignments, getLocationProvider, getMaxMigrations, shouldBalance
-
Methods inherited from class org.apache.accumulo.server.master.balancer.TabletBalancer
balance, checkMigrationSanity, constraintNotMet, getAssignments, getOnlineTabletsForTable, init, init, init, resetBalancerErrors
-
-
-
-
Constructor Detail
-
RegexGroupBalancer
public RegexGroupBalancer(TableId tableId)
Deprecated.
-
-
Method Detail
-
getWaitTime
protected long getWaitTime()
Deprecated.Description copied from class:GroupBalancer
The amount of time to wait between balancing.- Overrides:
getWaitTime
in classGroupBalancer
-
getPartitioner
protected Function<KeyExtent,String> getPartitioner()
Deprecated.- Specified by:
getPartitioner
in classGroupBalancer
- Returns:
- A function that groups tablets into named groups.
-
-