Thanks for the info Michael Han. On Mon, May 9, 2016 at 9:56 PM, Michael Han <[email protected]> wrote:
> Hi Arun, > > There is no API to associate data with a session. I think you can track the > tag to session id mappings explicitly out side of ZooKeeper if this is for > forensic purposes. When a client connects to ZK server ensemble you can > call getSessionId method on the client instance which gives you the session > Id, then you can store the Id along with your tags in a file or a data > store for later analysis. You can also store them in ZK but that will > create overhead that could impact normal use cases. You might also want to > handle cases where a client can get multiple session id caused by session > expiration. > > > On Mon, May 9, 2016 at 11:06 AM, Arun M. Krishnakumar <[email protected]> > wrote: > > > Hi, > > > > We have a couple of clusters connected to the same Zookeeper cluster and > > the clients make and terminate sessions at random times. Is it possible > for > > a client to 'tag' the zookeeper session so that we can know from the > server > > logs which sessions correspond to which client application ? > > > > This is useful to us because we have different session characteristics > from > > each client and we have at least three such different clients connected > to > > the same ZK cluster. When looking at the server logs it's tough to > > determine what session belongs to which application (since the > application > > IP addresses overlap in our scenario). > > > > Is there an API already available to add this tag ? > > > > Thanks and Regards, > > Arun M. Krishnakumar > > > > > > -- > Cheers > Michael. >
