static class StochasticLoadBalancer.RegionReplicaCandidateGenerator extends StochasticLoadBalancer.CandidateGenerator
Modifier and Type | Field and Description |
---|---|
(package private) StochasticLoadBalancer.RandomCandidateGenerator |
randomGenerator |
Constructor and Description |
---|
StochasticLoadBalancer.RegionReplicaCandidateGenerator() |
Modifier and Type | Method and Description |
---|---|
(package private) BaseLoadBalancer.Cluster.Action |
generate(BaseLoadBalancer.Cluster cluster) |
(package private) int |
selectCoHostedRegionPerGroup(int[] primariesOfRegionsPerGroup,
int[] regionsPerGroup,
int[] regionIndexToPrimaryIndex)
Randomly select one regionIndex out of all region replicas co-hosted in the same group
(a group is a server, host or rack)
|
getAction, pickOtherRandomRack, pickOtherRandomServer, pickRandomRack, pickRandomRegion, pickRandomRegions, pickRandomServer
StochasticLoadBalancer.RandomCandidateGenerator randomGenerator
StochasticLoadBalancer.RegionReplicaCandidateGenerator()
int selectCoHostedRegionPerGroup(int[] primariesOfRegionsPerGroup, int[] regionsPerGroup, int[] regionIndexToPrimaryIndex)
primariesOfRegionsPerGroup
- either Cluster.primariesOfRegionsPerServer,
primariesOfRegionsPerHost or primariesOfRegionsPerRackregionsPerGroup
- either Cluster.regionsPerServer, regionsPerHost or regionsPerRackregionIndexToPrimaryIndex
- Cluster.regionsIndexToPrimaryIndexBaseLoadBalancer.Cluster.Action generate(BaseLoadBalancer.Cluster cluster)
generate
in class StochasticLoadBalancer.CandidateGenerator
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.