java.lang.Object | |
↳ | org.apache.helix.manager.zk.ZKHelixManager |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | ALLOW_PARTICIPANT_AUTO_JOIN | ||||||||||
int | FLAPPING_TIME_WINDIOW | ||||||||||
int | MAX_DISCONNECT_THRESHOLD |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
org.apache.helix.HelixManager
|
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
_controllerTimerTasks | |||||||||||
_handlers | |||||||||||
_liveInstanceInfoProvider | |||||||||||
_zkAddress | |||||||||||
_zkclient |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Add listener for controller change
Used in distributed cluster controller
| |||||||||||
Add message listener for controller
| |||||||||||
Add a callback that is invoked before a participant joins the cluster.
| |||||||||||
Start participating in the cluster operations.
| |||||||||||
Disconnect from the cluster.
| |||||||||||
Provides admin interface to setup and modify cluster.
| |||||||||||
Returns the cluster name associated with this cluster manager
| |||||||||||
Get config accessor
| |||||||||||
Participant only component that periodically update participant health
report to cluster manager server.
| |||||||||||
Return the client to perform read/write operations on the cluster data
store
| |||||||||||
Get property store
| |||||||||||
Returns the instanceName used to connect to the cluster
| |||||||||||
Get cluster manager instance type
| |||||||||||
The time stamp is always updated when a notification is received.
| |||||||||||
Messaging service which can be used to send cluster wide messages.
| |||||||||||
Get helix manager properties read from
helix-core/src/main/resources/cluster-manager.properties
| |||||||||||
Get the sessionId associated with the connection to cluster data store.
| |||||||||||
Get cluster manager version
| |||||||||||
Check if the connection is alive, code depending on cluster manager must
always do this if( manager.isConnected()){ //custom code } This will
prevent client in doing anything when its disconnected from the cluster.
| |||||||||||
Check if the cluster manager is the leader
| |||||||||||
Removes the listener.
| |||||||||||
Add a LiveInstanceInfoProvider that is invoked before creating liveInstance.
| |||||||||||
start timer tasks when becomes leader
| |||||||||||
stop timer tasks when becomes standby
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.I0Itec.zkclient.IZkStateListener
| |||||||||||
From interface
org.apache.helix.HelixManager
|
Exception |
---|
Add listener for controller change Used in distributed cluster controller
Add message listener for controller
Exception |
---|
Exception |
---|
Exception |
---|
Add a callback that is invoked before a participant joins the cluster. This zookeeper connection is established at this time and one can read existing cluster data The purpose of this method is to allow application to have additional logic to validate their existing state and check for any errors. If the validation fails, throw exception/disable the instance. s
Start participating in the cluster operations. All listeners will be initialized and will be notified for every cluster state change This method is not re-entrant. One cannot call this method twice.
Exception |
---|
Disconnect from the cluster. All the listeners will be removed and disconnected from the server. Its important for the client to ensure that new manager instance is used when it wants to connect again.
Provides admin interface to setup and modify cluster.
Returns the cluster name associated with this cluster manager
Participant only component that periodically update participant health report to cluster manager server.
Return the client to perform read/write operations on the cluster data store
Get property store
Returns the instanceName used to connect to the cluster
Get cluster manager instance type
The time stamp is always updated when a notification is received. This can be used to check if there was any new notification when previous notification was being processed. This is updated based on the notifications from listeners registered.
Messaging service which can be used to send cluster wide messages.
Get helix manager properties read from helix-core/src/main/resources/cluster-manager.properties
Get the sessionId associated with the connection to cluster data store.
Check if the connection is alive, code depending on cluster manager must always do this if( manager.isConnected()){ //custom code } This will prevent client in doing anything when its disconnected from the cluster. There is no need to invoke connect again if isConnected return false.
Check if the cluster manager is the leader
Removes the listener. If the same listener was used for multiple changes,
all change notifications will be removed.
This will invoke onChange method on the listener with
NotificationContext.type set to FINALIZE. Listener can clean up its state.
The data provided in this callback may not be reliable.
When a session expires all listeners will be removed and re-added
automatically.
This provides the ability for listeners to either reset their state or do
any cleanup tasks.
Add a LiveInstanceInfoProvider that is invoked before creating liveInstance. This allows applications to provide additional metadata that will be published to zk and made available for discovery
start timer tasks when becomes leader
stop timer tasks when becomes standby