ZooKeeper Notes

Distributed: zookeeper: data storage server (tree structure)

In a distributed environment: network flash disconnection, reconnection mechanism... (data synchronization [efficiency, reliability, atomicity])

The principle of synchronous brushing, asynchronous brushing, and more than half of the ok pass

Watcher

Zookeeper has a watch event, which is triggered at one time. When the data monitored by the watch changes, it notifies the client that set the watch, that is, the watcher

Similarly, if its watcher is monitoring data to send some changes, there must be a corresponding event type and state type.

Event type: (znode node related)

EventType.NodeCreated

EventType.NodeDataChanged

EventType.NodeChildrenChanged

EventType.NodeDeleted

Status type: (is related to the client instance)

KeeperState.Disconnected

KeeperState.SyncConnected

KeeperState.AuthFailed

KeeperState.Expired

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325894420&siteId=291194637