zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Han <h...@cloudera.com>
Subject Re: tagging clients of zookeeper
Date Tue, 10 May 2016 04:56:24 GMT
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 <arunmk95@gmail.com>
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.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message