public class

ClusterStatusMonitor

extends Object
implements ClusterStatusMonitorMBean
java.lang.Object
   ↳ org.apache.helix.monitoring.mbeans.ClusterStatusMonitor

Summary

Constants
String CLUSTER_STATUS_KEY
String DEFAULT_TAG
String PARTICIPANT_STATUS_KEY
Public Constructors
ClusterStatusMonitor(String clusterName)
Public Methods
void addMessageQueueSize(String instanceName, long msgQueueSize)
String clusterBeanName()
String getBeanName()
long getDisabledInstancesGauge()
long getDisabledPartitionsGauge()
long getDownInstanceGauge()
long getInstanceMessageQueueBacklog()
The sum of all message queue sizes for instances in this cluster
long getInstancesGauge()
long getMaxMessageQueueSizeGauge()
The max message queue size across all instances including controller
ObjectName getObjectName(String name)
String getPerInstanceResourceBeanName(String instanceName, String resourceName)
Build per-instance resource bean name: "cluster={clusterName},instanceName={instanceName},resourceName={resourceName}"
String getSensorName()
void reset()
void setClusterInstanceStatus(Set<String> liveInstanceSet, Set<String> instanceSet, Set<String> disabledInstanceSet, Map<StringSet<String>> disabledPartitions, Map<StringSet<String>> tags)
Update the gauges for all instances in the cluster
void setPerInstanceResourceStatus(BestPossibleStateOutput bestPossibleStates, Map<StringInstanceConfig> instanceConfigMap, Map<ResourceIdResourceConfig> resourceMap, Map<StringStateModelDefinition> stateModelDefMap)
Update gauges for resource at instance level
void setResourceStatus(ExternalView externalView, IdealState idealState, StateModelDefinition stateModelDef)
void unregisterResource(String resourceName)
Indicate that a resource has been dropped, thus making it OK to drop its metrics
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.apache.helix.monitoring.SensorNameProvider
From interface org.apache.helix.monitoring.mbeans.ClusterStatusMonitorMBean

Constants

public static final String CLUSTER_STATUS_KEY

Constant Value: "ClusterStatus"

public static final String DEFAULT_TAG

Constant Value: "DEFAULT"

public static final String PARTICIPANT_STATUS_KEY

Constant Value: "ParticipantStatus"

Public Constructors

public ClusterStatusMonitor (String clusterName)

Public Methods

public void addMessageQueueSize (String instanceName, long msgQueueSize)

public String clusterBeanName ()

public String getBeanName ()

public long getDisabledInstancesGauge ()

public long getDisabledPartitionsGauge ()

public long getDownInstanceGauge ()

public long getInstanceMessageQueueBacklog ()

The sum of all message queue sizes for instances in this cluster

public long getInstancesGauge ()

public long getMaxMessageQueueSizeGauge ()

The max message queue size across all instances including controller

public ObjectName getObjectName (String name)

public String getPerInstanceResourceBeanName (String instanceName, String resourceName)

Build per-instance resource bean name: "cluster={clusterName},instanceName={instanceName},resourceName={resourceName}"

Returns
  • per-instance resource bean name

public String getSensorName ()

public void reset ()

public void setClusterInstanceStatus (Set<String> liveInstanceSet, Set<String> instanceSet, Set<String> disabledInstanceSet, Map<StringSet<String>> disabledPartitions, Map<StringSet<String>> tags)

Update the gauges for all instances in the cluster

Parameters
liveInstanceSet the current set of live instances
instanceSet the current set of configured instances (live or other
disabledInstanceSet the current set of configured instances that are disabled
disabledPartitions a map of instance name to the set of partitions disabled on it
tags a map of instance name to the set of tags on it

public void setPerInstanceResourceStatus (BestPossibleStateOutput bestPossibleStates, Map<StringInstanceConfig> instanceConfigMap, Map<ResourceIdResourceConfig> resourceMap, Map<StringStateModelDefinition> stateModelDefMap)

Update gauges for resource at instance level

public void setResourceStatus (ExternalView externalView, IdealState idealState, StateModelDefinition stateModelDef)

public void unregisterResource (String resourceName)

Indicate that a resource has been dropped, thus making it OK to drop its metrics

Parameters
resourceName the resource that has been dropped