java.lang.Object
org.elasticsearch.cluster.routing.allocation.allocator.DesiredBalanceMetrics

public class DesiredBalanceMetrics extends Object
Maintains balancer metrics and makes them accessible to the MeterRegistry and APM reporting. Metrics are updated (updateMetrics(org.elasticsearch.cluster.routing.allocation.allocator.DesiredBalanceMetrics.AllocationStats, java.util.Map<org.elasticsearch.cluster.node.DiscoveryNode, org.elasticsearch.cluster.routing.allocation.allocator.DesiredBalanceMetrics.NodeWeightStats>, java.util.Map<org.elasticsearch.cluster.node.DiscoveryNode, org.elasticsearch.cluster.routing.allocation.NodeAllocationStatsAndWeightsCalculator.NodeAllocationStatsAndWeight>)) or cleared (zeroAllMetrics()) as a result of cluster events and the metrics will be pulled for reporting via the MeterRegistry implementation. Only the master node reports metrics: see setNodeIsMaster(boolean). When nodeIsMaster is false, empty values are returned such that MeterRegistry ignores the metrics for reporting purposes.