Class LoadBalancer
java.lang.Object
org.apache.phoenix.loadbalancer.service.LoadBalancer
LoadBalancer class is singleton , used by the client
to find out about various location of PQS servers.
The client needs to configure the HBase-site.xml with the needed
properties i.e. location of zookeeper ( or service locator), username, password etc.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionreturn locations of all Phoenix Query Servers in the form of a List of PQS serversstatic LoadBalancerReturn Singleton Load Balancer every single time.It returns the location of Phoenix Query Server in form of a HostAndPort (copied from Guava) from the cache.
-
Field Details
-
LOG
protected static final org.slf4j.Logger LOG
-
-
Method Details
-
getLoadBalancer
Return Singleton Load Balancer every single time.- Returns:
- LoadBalancer
-
getSingleServiceLocation
It returns the location of Phoenix Query Server in form of a HostAndPort (copied from Guava) from the cache. The client should catch Exception incase the method is unable to fetch PQS location due to network failure or in-correct configuration issues.- Returns:
- - return HostAndPort
- Throws:
Exception
-
getAllServiceLocation
return locations of all Phoenix Query Servers in the form of a List of PQS servers- Returns:
- - HostAndPort
- Throws:
Exception
-