public class

Alerts

extends HelixProperty
java.lang.Object
   ↳ org.apache.helix.HelixProperty
     ↳ org.apache.helix.model.Alerts

Class Overview

Describe alerts and corresponding metrics. An alert is triggered when cluster health violates pre-defined constraints to ensure that the cluster meets SLAs.

Summary

Nested Classes
enum Alerts.AlertsProperty Supported fields corresponding to a set of alerts  
Constants
String nodeName The name of the ZNode corresponding to this property
[Expand]
Inherited Fields
From class org.apache.helix.HelixProperty
Public Constructors
Alerts(String id)
Instantiate with an identifier
Alerts(ZNRecord record)
Instantiate with a pre-populated Alerts record
Public Methods
String getInstanceName()
Get the instance that the alerts correspond to
Map<StringMap<StringString>> getMapFields()
Get the alerts
String getSessionId()
Get the session that the alerts correspond to
Map<StringString> getStatFields(String statName)
Get specific alert statistics
boolean isValid()
Get property validity
void setSessionId(String sessionId)
Set the session that the alerts correspond to
[Expand]
Inherited Methods
From class org.apache.helix.HelixProperty
From class java.lang.Object

Constants

public static final String nodeName

The name of the ZNode corresponding to this property

Constant Value: "Alerts"

Public Constructors

public Alerts (String id)

Instantiate with an identifier

Parameters
id A string that identifies the alerts

public Alerts (ZNRecord record)

Instantiate with a pre-populated Alerts record

Parameters
record ZNRecord representing Alerts

Public Methods

public String getInstanceName ()

Get the instance that the alerts correspond to

Returns
  • the name of the instance

public Map<StringMap<StringString>> getMapFields ()

Get the alerts

Returns
  • a mapping of alert stat name to alert properties

public String getSessionId ()

Get the session that the alerts correspond to

Returns
  • session identifier

public Map<StringString> getStatFields (String statName)

Get specific alert statistics

Parameters
statName the name of the statistic group
Returns
  • a mapping of property and value for the statistic

public boolean isValid ()

Get property validity

Returns
  • true if valid, false if invalid

public void setSessionId (String sessionId)

Set the session that the alerts correspond to

Parameters
sessionId the session for which alerts occurred