public class HostRegexTableLoadBalancer extends TableLoadBalancer implements ConfigurationObserver
TabletBalancer.BalancerProblem, TabletBalancer.NoTservers, TabletBalancer.OutstandingMigrations| Modifier and Type | Field and Description |
|---|---|
protected static String |
DEFAULT_POOL |
static String |
HOST_BALANCER_OOB_CHECK_KEY |
static String |
HOST_BALANCER_OUTSTANDING_MIGRATIONS_KEY |
static String |
HOST_BALANCER_POOL_RECHECK_KEY
Deprecated.
|
static String |
HOST_BALANCER_PREFIX |
static String |
HOST_BALANCER_REGEX_MAX_MIGRATIONS_KEY |
static String |
HOST_BALANCER_REGEX_USING_IPS_KEY |
protected long |
oobCheckMillis |
configuration, context, TIME_BETWEEN_BALANCER_WARNINGS| Constructor and Description |
|---|
HostRegexTableLoadBalancer() |
getBalancerForTable, getLoadBalancerClassNameForTable, getTableOperationscheckMigrationSanity, constraintNotMet, getOnlineTabletsForTable, init, resetBalancerErrorspublic static final String HOST_BALANCER_PREFIX
public static final String HOST_BALANCER_OOB_CHECK_KEY
@Deprecated public static final String HOST_BALANCER_POOL_RECHECK_KEY
public static final String HOST_BALANCER_REGEX_USING_IPS_KEY
public static final String HOST_BALANCER_REGEX_MAX_MIGRATIONS_KEY
protected static final String DEFAULT_POOL
public static final String HOST_BALANCER_OUTSTANDING_MIGRATIONS_KEY
protected long oobCheckMillis
protected Map<String,SortedMap<TServerInstance,TabletServerStatus>> splitCurrentByRegex(SortedMap<TServerInstance,TabletServerStatus> current)
current - map of current tserversprotected List<String> getPoolNamesForHost(String host)
host - tablet server hostprotected String getNameFromIp(String hostIp) throws UnknownHostException
UnknownHostExceptionprotected String getPoolNameForTable(String tableName)
tableName - name of tableprotected void parseConfiguration(ServerConfiguration conf)
conf - server configurationpublic int getMaxMigrations()
public int getMaxOutstandingMigrations()
public long getOobCheckMillis()
@Deprecated public long getPoolRecheckMillis()
public boolean isIpBasedRegex()
public int getMaxConcurrentMigrations()
public void init(ServerConfigurationFactory conf)
TabletBalancerinit in class TabletBalancerpublic void getAssignments(SortedMap<TServerInstance,TabletServerStatus> current, Map<KeyExtent,TServerInstance> unassigned, Map<KeyExtent,TServerInstance> assignments)
TabletBalancergetAssignments in class TableLoadBalancercurrent - The current table-summary state of all the online tablet servers. Read-only. The
TabletServerStatus for each server may be null if the tablet server has not yet
responded to a recent request for status.unassigned - A map from unassigned tablet to the last known tablet server. Read-only.assignments - A map from tablet to assigned server. Write-only.public long balance(SortedMap<TServerInstance,TabletServerStatus> current, Set<KeyExtent> migrations, List<TabletMigration> migrationsOut)
TabletBalancerbalance in class TableLoadBalancercurrent - The current table-summary state of all the online tablet servers. Read-only.migrations - the current set of migrations. Read-only.migrationsOut - new migrations to perform; should not contain tablets in the current set of
migrations. Write-only.public void propertyChanged(String key)
propertyChanged in interface ConfigurationObserverpublic void propertiesChanged()
propertiesChanged in interface ConfigurationObserverpublic void sessionExpired()
sessionExpired in interface ConfigurationObserverCopyright © 2011–2018 The Apache Software Foundation. All rights reserved.