public class GangliaLBSPolicy extends AbstractHostLBSPolicy
IHALoadBalancerPolicy has a dependency on the
GangliaPlugIn must be setup to listen to
the Ganglia protocol and build up an in-memory model of the load on each
host. Ganglia MUST be reporting metrics for each host running an
HAJournalServer instance. This can be achieved either using the
gmond utility from the ganglia distribution or using the
Note: The actual performance metrics will be reported by a given ganglia
daemon on some host depend on the ganglia implementation, ganglia
configuration, and the host OS. Some key performance metrics may not be
available on all hosts. For example, IO Wait is not available under OSX. The
available performance metrics constraints the
you can utilize on a given cluster. You can monitor the available performance
metrics by running the
Note: The ganglia updates are not synchronized across a cluster. They pour in ever N seconds from each host. However, the hosts do not begin to report on the same N second boundary. All you know is that (on average) all hosts should have reported in within N seconds.
|Modifier and Type||Class and Description|
|Constructor and Description|
|Modifier and Type||Method and Description|
Destroy the policy (stop any asynchronous processing, release any resources).
Return the name of the
Return a map from the known canonical hostnames (as self-reported by the services) of the joined services to the
Initialize the policy.
Extension hook for
conditionallyForwardReadRequest, conditionallyUpdateServiceTable, getHostDiscoveryDelay, getReaderURI, setLocalForwardThreshold, updateHostTable, updateServiceTable
getJournal, getLeaderURI, getLocalServiceScore, getServiceScoreForHostname, notify, service, toString
protected void toString(StringBuilder sb)
AbstractLBSPolicy.toString()- implementation MUST NOT block.
public void init(javax.servlet.ServletConfig servletConfig, IIndexManager indexManager) throws javax.servlet.ServletException
public void destroy()
protected Map<String,IHostMetrics> getHostReportForKnownServices(IHostScoringRule scoringRule, ServiceScore serviceScores)
IHostMetricss for those hosts.
This implementation queries the in-memory model of the cluster that is
built up and maintained by the integrated
IHostScoringRuleto be applied.
serviceScores- The set of known services.
UUIDand the host metrics were combined into the map once for each service.
protected String getDefaultScoringRule()
IHostScoringRulethat provides default value for the
Note: The policy needs to be specific to the LBS implementation since the names of the host metrics depend on the system that is being used to collect and report them.
Copyright © 2006–2016 SYSTAP, LLC DBA Blazegraph. All rights reserved.