Keith Laban commented on SOLR-9659:

I've used the *Cache recipes Scott is talking about pretty extensively for 
various projects. It makes doing what you describe pretty trivial. No resetting 
watches, dealing with timing, dealing with client connections. 

1) Create a client
2) Create a PathChildrenCache or NodeCache for a path
3) Add a listener for cache changes
4) Start the cache

Everything else is maintained by Curator. Which has become a pretty battle 
tested piece of software.

> Add zookeeper DataWatch API
> ---------------------------
>                 Key: SOLR-9659
>                 URL: https://issues.apache.org/jira/browse/SOLR-9659
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Alan Woodward
>            Assignee: Alan Woodward
>         Attachments: SOLR-9659.patch
> We have several components which need to set up watches on ZooKeeper nodes 
> for various aspects of cluster management.  At the moment, all of these 
> components do this themselves, leading to large amounts of duplicated code, 
> and complicated logic for dealing with reconnections, etc, scattered across 
> the codebase.  We should replace this with a simple API controlled by 
> SolrZkClient, which should make the code more robust, and testing 
> considerably easier.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to