Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Apache ZooKeeper Essentials

You're reading from   Apache ZooKeeper Essentials A fast-paced guide to using Apache ZooKeeper to coordinate services in distributed systems

Arrow left icon
Product type Paperback
Published in Jan 2015
Publisher
ISBN-13 9781784391324
Length 168 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Saurav Haloi Saurav Haloi
Author Profile Icon Saurav Haloi
Saurav Haloi
Arrow right icon
View More author details
Toc

Watches and ZooKeeper operations

The write operations in ZooKeeper are atomic and durable. There is the guarantee of a successful write operation if it has been written to persistent storage on a majority of ZooKeeper's servers. However, the eventual consistency model of ZooKeeper permits reads to log the latest state of the ZooKeeper service, and the sync operation allows a client to be up-to-date with the most recent state of the ZooKeeper service.

The read operations in znodes, such as exists, getChildren, and getData, allow watches to be set on them. On the other hand, the watches triggered by znode's write operations, such as create, delete, and setData ACL operations do not participate in watches.

The following are the types of watch events that might occur during a znode state change:

  • NodeChildrenChanged: A znode's child is created or deleted
  • NodeCreated: A znode is created in a ZooKeeper path
  • NodeDataChanged: The data associated with a znode is updated
  • NodeDeleted: A znode...
You have been reading a chapter from
Apache ZooKeeper Essentials
Published in: Jan 2015
Publisher:
ISBN-13: 9781784391324
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime