public class

AlertStatus

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

Class Overview

Get characteristics of alerts, whether they were fired, and their context. An alert is triggered when cluster health violates pre-defined constraints to ensure that the cluster meets SLAs.

Summary

Constants
String nodeName The name of the ZNode containing alert status
[Expand]
Inherited Fields
From class org.apache.helix.HelixProperty
Public Constructors
AlertStatus(String id)
Instantiate with an identifier
AlertStatus(ZNRecord record)
Instantiate with a pre-populated record corresponding to alert status
Public Methods
String getInstanceName()
Get the instance that these alerts correspond to
Map<StringMap<StringString>> getMapFields()
Get the properties of all alerts, such as if they were fired
String getSessionId()
Get the session that these alerts correspond to
Map<StringString> getStatFields(String statName)
Get the statistics of a single alert
SessionId getTypedSessionId()
Get the session that the alerts correspond to
boolean isValid()
Get property validity
void setSessionId(SessionId sessionId)
Set the session that the alerts correspond to
void setSessionId(String sessionId)
Set the session that these 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 containing alert status

Constant Value: "AlertStatus"

Public Constructors

public AlertStatus (String id)

Instantiate with an identifier

Parameters
id identifier representing this group of alert statuses

public AlertStatus (ZNRecord record)

Instantiate with a pre-populated record corresponding to alert status

Parameters
record ZNRecord representing alert statuses

Public Methods

public String getInstanceName ()

Get the instance that these alerts correspond to

Returns
  • name of the instance

public Map<StringMap<StringString>> getMapFields ()

Get the properties of all alerts, such as if they were fired

Returns
  • all alert statuses as a Map of alert to the status properties

public String getSessionId ()

Get the session that these alerts correspond to

Returns
  • session identifier

public Map<StringString> getStatFields (String statName)

Get the statistics of a single alert

Parameters
statName Name of the alert
Returns
  • alert statistics as a map of name, value pairs

public SessionId getTypedSessionId ()

Get the session that the alerts correspond to

Returns
  • session identifier

public boolean isValid ()

Get property validity

Returns
  • true if valid, false if invalid

public void setSessionId (SessionId sessionId)

Set the session that the alerts correspond to

Parameters
sessionId the session for which alerts occurred

public void setSessionId (String sessionId)

Set the session that these alerts correspond to

Parameters
sessionId session for which to look up alerts