Add a watch while creating a lock using Curator Lock API -
we have specific case 1 process acquire curator lock on key , attach watch. other process attach watch on same key. want other process notified whenever lock released(either process or zookeeper(when process dead).
i trying nodecache per guess nodecache not work when znode type ephemeral_sequential. @ leaset test case getting failed.
i managed solve problem using pathchildrencache instead of nodecache.the curator locking api creates ephemeral_sequence mode on zk. difficult provide exact path nodecache watch upon. pathchiredrencache implementation called when of process uses lock on same key create child nodes inside key on zookeeper.
Comments
Post a Comment