package

org.apache.helix

Provide the classes necessary to create a Helix cluster manager

General flow

 manager = HelixManagerFactory.getManagerForROLE(); ROLE can be participant, spectator or a controller
manager.connect(); manager.addSOMEListener(); After connect the subsequent interactions will be via listener onChange callbacks There will be 3 scenarios for onChange callback, which can be determined using NotificationContext.type INIT -> will be invoked the first time the listener is added CALLBACK -> will be invoked due to datachange in the property value FINALIZE -> will be invoked when listener is removed or session expires manager.disconnect()
Default implementations available

Interfaces

BaseDataAccessor<T> Generic interface for accessing and manipulating data on a backing store like Zookeeper. 
ClusterMessagingService Provides the ability to
  • Send message to a specific component in the cluster[ participant, controller, Spectator(probably not needed) ]
  • Broadcast message to all participants
  • Send message to instances that hold a specific resource
  • Asynchronous request response api. 
  • ConfigChangeListener This interface is deprecated. replaced by InstanceConfigChangeListener  
    ControllerChangeListener Interface to implement to respond to controller changes. 
    CurrentStateChangeListener Interface to implement to respond to changes in the current state  
    ExternalViewChangeListener Interface to implement to be notified of changes to the external view  
    HelixAdmin  
    HelixConstants  
    HelixDataAccessor Interface used to interact with Helix Data Types like IdealState, Config, LiveInstance, Message, ExternalView etc PropertyKey represent the HelixData type. 
    HelixManager Class that represents the Helix Agent. 
    IdealStateChangeListener Interface to implement to listen for changes to the ideal state of resources. 
    InstanceConfigChangeListener Interface to implement to listen for changes to instance configurations. 
    LiveInstanceChangeListener Interface to implement to listen for live instance changes. 
    LiveInstanceInfoProvider Interface to provide additional information about a live instance at creation time  
    MessageListener Interface to implement when there is a change to messages  
    PreConnectCallback Called to allow definition of tasks prior to connecting to Zookeeper  
    ScopedConfigChangeListener Interface to implement to listen for changes to any specified scope. 

    Classes

    AccessOption  
    ConfigAccessor Provides access to the persistent configuration of the cluster, the instances that live on it, and the logical resources assigned to it. 
    Criteria Describes various properties that operations involving Message delivery will follow. 
    ExternalCommand Wrapper for running commands outside of the JVM 
    GroupCommit Support committing updates to data such that they are ordered for each key  
    HelixManagerFactory Obtain one of a set of Helix cluster managers, organized by the backing system. 
    HelixManagerProperties hold helix-manager properties read from helix-core/src/main/resources/cluster-manager.properties  
    HelixProperty A wrapper class for ZNRecord. 
    HelixTimerTask Interface for defining a generic task to run periodically. 
    NotificationContext Metadata associated with a notification event and the current state of the cluster  
    PropertyKey Key allowing for type-safe lookups of and conversions to HelixProperty objects. 
    PropertyKey.Builder PropertyKey builder for a cluster  
    PropertyPathConfig Utility mapping properties to their Zookeeper locations  
    ZNRecord Generic Record Format to store data at a Node This can be used to store simpleFields mapFields listFields  
    ZNRecordAssembler Constructs ZNRecords from collections of ZNRecords  
    ZNRecordBucketizer Operations to divide a ZNRecord into specified buckets  
    ZNRecordDelta A ZNRecord container that specifies how it should be merged with another ZNRecord  
    ZNRecordUpdater Class that specifies how a ZNRecord should be updated with another ZNRecord  

    Enums

    Criteria.DataSource  
    HelixConstants.ChangeType  
    HelixConstants.ClusterConfigType  
    HelixConstants.StateModelToken  
    HelixDefinedState helix defined states ERROR : when errors happen during state transitions, transit to ERROR state participant will also invoke state-model.on-err(), ignore errors in state-model.on-err() when drop resource in ERROR state and not disabled, controller sends ERROR->DROPPED transition if errors happen in ERROR->DROPPED transition, participant will disable resource/partition when disable resource/partition in ERROR state, resource/partition will be marked disabled but controller not send any transitions when reset resource/partition in ERROR state and not disabled controller send ERROR->initial-state transition if errors happen in ERROR->initial-state transition, remain in ERROR state DROPPED : when drop resource in a non-ERROR state and not disabled controller sends all the transitions from current-state to initial-state then sends initial-state->DROPPED transition 
    HelixProperty.HelixPropertyAttribute  
    InstanceType CONTROLLER: cluster managing component is a controller PARTICIPANT: participate in the cluster state changes SPECTATOR: interested in the state changes in the cluster CONTROLLER_PARTICIPANT: special participant that competes for the leader of CONTROLLER_CLUSTER used in cluster controller of distributed mode {@HelixControllerMain }  
    NotificationContext.MapKey keys used for object map  
    NotificationContext.Type Valid types of notifications  
    PropertyType Types of data stored on Zookeeper by Helix  
    ZNRecordDelta.MergeOperation Supported methods of updating a ZNRecord  

    Exceptions

    HelixException Base class for an exception thrown by Helix due to inconsistencies caught by Helix itself.