public class

ClusterDataCache

extends Object
java.lang.Object
   ↳ org.apache.helix.controller.stages.ClusterDataCache

Class Overview

Reads the data from the cluster using data accessor. This output ClusterData which provides useful methods to search/lookup properties

Summary

Public Constructors
ClusterDataCache()
Public Methods
ClusterConstraints getConstraint(ClusterConstraints.ConstraintType type)
Returns the ClusterConstraints for a given constraintType
Map<StringCurrentState> getCurrentState(String instanceName, String clientSessionId)
Provides the current state of the node for a given session id, the sessionid can be got from LiveInstance
Set<String> getDisabledInstancesForPartition(String partition)
Some partitions might be disabled on specific nodes.
IdealState getIdealState(String resourceName)
Provides the idealstate for a given resource
Map<StringIdealState> getIdealStates()
Retrieves the idealstates for all resources
Map<StringInstanceConfig> getInstanceConfigMap()
Returns the instance config map
Map<StringLiveInstance> getLiveInstances()
Returns the LiveInstances for each of the instances that are curretnly up and running
Map<StringMessage> getMessages(String instanceName)
Provides a list of current outstanding transitions on a given instance.
int getReplicas(String resourceName)
Returns the number of replicas for a given resource.
StateModelDefinition getStateModelDef(String stateModelDefRef)
Provides the state model definition for a given state model
boolean refresh(HelixDataAccessor accessor)
This refreshes the cluster data by re-fetching the data from zookeeper in an efficient way
String toString()
toString method to print the entire cluster state
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ClusterDataCache ()

Public Methods

public ClusterConstraints getConstraint (ClusterConstraints.ConstraintType type)

Returns the ClusterConstraints for a given constraintType

public Map<StringCurrentState> getCurrentState (String instanceName, String clientSessionId)

Provides the current state of the node for a given session id, the sessionid can be got from LiveInstance

public Set<String> getDisabledInstancesForPartition (String partition)

Some partitions might be disabled on specific nodes. This method allows one to fetch the set of nodes where a given partition is disabled

public IdealState getIdealState (String resourceName)

Provides the idealstate for a given resource

public Map<StringIdealState> getIdealStates ()

Retrieves the idealstates for all resources

public Map<StringInstanceConfig> getInstanceConfigMap ()

Returns the instance config map

public Map<StringLiveInstance> getLiveInstances ()

Returns the LiveInstances for each of the instances that are curretnly up and running

public Map<StringMessage> getMessages (String instanceName)

Provides a list of current outstanding transitions on a given instance.

public int getReplicas (String resourceName)

Returns the number of replicas for a given resource.

public StateModelDefinition getStateModelDef (String stateModelDefRef)

Provides the state model definition for a given state model

public boolean refresh (HelixDataAccessor accessor)

This refreshes the cluster data by re-fetching the data from zookeeper in an efficient way

public String toString ()

toString method to print the entire cluster state