public class

PersistentStats

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

Class Overview

Statistics for an instance

Summary

Nested Classes
enum PersistentStats.PersistentStatsProperty High-level properties to provide context for these statistics  
Constants
String nodeName The name of the statistics ZNode
[Expand]
Inherited Fields
From class org.apache.helix.HelixProperty
Public Constructors
PersistentStats(String id)
Instantiate with an identifier
PersistentStats(ZNRecord record)
Instantiate with a pre-populated record
Public Methods
String getInstanceName()
Get the instance for which these stats have been collected
Map<StringMap<StringString>> getMapFields()
Get all the statistics currently stored
String getSessionId()
Get the session corresponding to these statistics
Map<StringString> getStatFields(String statName)
Get a specific statistic
boolean isValid()
Get property validity
void setSessionId(String sessionId)
Set the session corresponding to these statistics
[Expand]
Inherited Methods
From class org.apache.helix.HelixProperty
From class java.lang.Object

Constants

public static final String nodeName

The name of the statistics ZNode

Constant Value: "PersistentStats"

Public Constructors

public PersistentStats (String id)

Instantiate with an identifier

Parameters
id record identifier

public PersistentStats (ZNRecord record)

Instantiate with a pre-populated record

Parameters
record ZNRecord with fields corresponding to persistent stats

Public Methods

public String getInstanceName ()

Get the instance for which these stats have been collected

Returns
  • instance name

public Map<StringMap<StringString>> getMapFields ()

Get all the statistics currently stored

Returns
  • map of (stat name, stat attribute, value)

public String getSessionId ()

Get the session corresponding to these statistics

Returns
  • session id

public Map<StringString> getStatFields (String statName)

Get a specific statistic

Parameters
statName the statistic to look up
Returns
  • map of (stat attribute, value)

public boolean isValid ()

Get property validity

Returns
  • true if valid, false if invalid

public void setSessionId (String sessionId)

Set the session corresponding to these statistics

Parameters
sessionId session id