1

I am very new to Zookeeper so I am trying to use Curator recipes to see if I can get my pretty simple asks out of the box.

I am trying to use Curator GroupMember class/recipe in order to split workload between nodes. GroupMember start() method javadoc says "begin caching all members" - how do I request or get a notification once all members are received?

Kind of a follow-up: I've notices that sometimes my groupMember.setData() invocation throws "initial create has not been processed. Call waitForInitialCreate() to ensure" which is on PersistentNode which is not even exposed by MemberGroup.

Looks like I am really missing something about MemberGroup API :(

AndreyB
  • 139
  • 1
  • 1
  • 6

1 Answers1

0

The caching in Curator uses the concept of "eventual consistency" - meaning that the values you get will just be whatever happens to be in the cache at the time. It is pretty good at staying up-to-date; it just doesn't guarantee that what you get will be the latest values.

In this case, "begin caching all members" just means that before the call to the start method there was no caching happening; and after the call caching will happen. It doesn't mean that you have to wait for caching to complete before you can use it, or anything like that.

simonalexander2005
  • 4,338
  • 4
  • 48
  • 92