Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 75A11200AC0 for ; Tue, 10 May 2016 06:56:58 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 7420C1609A8; Tue, 10 May 2016 04:56:58 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id BEA44160A0F for ; Tue, 10 May 2016 06:56:57 +0200 (CEST) Received: (qmail 77397 invoked by uid 500); 10 May 2016 04:56:56 -0000 Mailing-List: contact user-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@zookeeper.apache.org Delivered-To: mailing list user@zookeeper.apache.org Received: (qmail 77286 invoked by uid 99); 10 May 2016 04:56:56 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 May 2016 04:56:56 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id C8588C00E7 for ; Tue, 10 May 2016 04:56:55 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.298 X-Spam-Level: * X-Spam-Status: No, score=1.298 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=cloudera-com.20150623.gappssmtp.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id hXeMpTqZf2n9 for ; Tue, 10 May 2016 04:56:54 +0000 (UTC) Received: from mail-vk0-f48.google.com (mail-vk0-f48.google.com [209.85.213.48]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id 8E7A05F231 for ; Tue, 10 May 2016 04:56:54 +0000 (UTC) Received: by mail-vk0-f48.google.com with SMTP id f66so2057028vkh.2 for ; Mon, 09 May 2016 21:56:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudera-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=wYDR9jVbO2kziir70qUXjeHhVBO/rxHiTmKd126Mv/0=; b=S43q/krODLFPz+6mEkTedqK+FFiljYJftt0LrbTUJRoAcX3wJaoTpci7nd/LDPMkc8 kjugMKGdOUWDJjsPT0nvvISh9ULixCJm4ciEOTYMiVX4z3ek696P8Nws5iu/sPNz6hnf 4kJ4ebTIF3JBvXaT6FBq99vMcnA+KEY0GWLRiu/eh/alibSpw5EDEi3FjchKVNBVhv69 oOI6THosIex21q8+RmFToW40mBcDpcE4uQsUFHRHmttJcx/wdiBU2+hXGguZkv3Lbi3z 6bMcfD9Gv+7yKrlu3MqL0er4ty31oIXfaS/U/M7INRblzPmyjDAtHeknoMSDWY2hDpjp BCEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=wYDR9jVbO2kziir70qUXjeHhVBO/rxHiTmKd126Mv/0=; b=Feg5LXwG/HX9LNz5SmmosC1u0ebY/ITSvuBoxl4qhFNnbed+eqDygpJI7Kv14Ic9e1 6zsNYLP34OkUORbjpkyXrEQKpX8/dFMQE0qPpne8tg4celKEkVSpW45hvQwHGRIUbOj4 rC8TC1AO8VWp6pGQTvDIybaQdHwBaZAmb1mC/c4KJ2Wk9GxA65bi06yFhl5VPZ6g26Wz tHyYTTfQ4xQXsEAmRpqOpQmYSJzsXIjKhBr+5o+Lq67/yP/3uKCyN3h9mJoCD5hgozT6 WTJ2cEnCabL3HcJl8ZqAvG6ugb0vCL28TLhsCFcWGzoNSr24ZgUIXtxxlyr0WvwMA4hL 8yPQ== X-Gm-Message-State: AOPr4FUWJJk3UdeN0ZiwE79U+MNPB1YaVoOCAhgKPTiomQx6xUmQN/GeYiY/DLVdy41sXgdVdWOcEOabiYpzHuFV X-Received: by 10.176.64.161 with SMTP id i30mr20725451uad.150.1462856213758; Mon, 09 May 2016 21:56:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.159.33.141 with HTTP; Mon, 9 May 2016 21:56:24 -0700 (PDT) In-Reply-To: References: From: Michael Han Date: Mon, 9 May 2016 21:56:24 -0700 Message-ID: Subject: Re: tagging clients of zookeeper To: user@zookeeper.apache.org Cc: dev@zookeeper.apache.org Content-Type: multipart/alternative; boundary=94eb2c123712faa91a053275c01f archived-at: Tue, 10 May 2016 04:56:58 -0000 --94eb2c123712faa91a053275c01f Content-Type: text/plain; charset=UTF-8 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 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. --94eb2c123712faa91a053275c01f--