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 187D52007D0 for ; Tue, 10 May 2016 08:44:34 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 171B11607AA; Tue, 10 May 2016 06:44:34 +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 62B21160877 for ; Tue, 10 May 2016 08:44:33 +0200 (CEST) Received: (qmail 53293 invoked by uid 500); 10 May 2016 06:44:32 -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 53203 invoked by uid 99); 10 May 2016 06:44:31 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 May 2016 06:44:31 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 627E5C11DF; Tue, 10 May 2016 06:44:31 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.429 X-Spam-Level: * X-Spam-Status: No, score=1.429 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id hXjUWiG6D8XV; Tue, 10 May 2016 06:44:29 +0000 (UTC) Received: from mail-vk0-f42.google.com (mail-vk0-f42.google.com [209.85.213.42]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 5FDCF5F24D; Tue, 10 May 2016 06:44:28 +0000 (UTC) Received: by mail-vk0-f42.google.com with SMTP id o133so4279868vka.0; Mon, 09 May 2016 23:44:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=XWVLWgWRshJRz81yv8GH+Vk7GARsCfLMes4lvKmPk/k=; b=jdUpkRmDCNVPDD09mndVpFLvw+U6B0aLhcf9OTpjeMrcoBuq6kaP2Bee5ouIxJLy50 7Gt9WxIx76yyLntKXrtsC8l98zbCKo2FLDLcC6abZO24IX9FszyosGOdm3Wk2Xr+PtJs ZTXriEELVnDkkc91V+N22uYGEvl/rjyGLkcMV4se/GkIOPDe7qnPu6WkM0Iqg0P/aalp y6iDxSmftHYafppPhSatxj3IaTIPaL+3iHEEJV9Rtol6i+belY1bE/OJovrEJqYwhXD4 6Cfgk0u3rj2oVUHMsrZQYLNNZQFU0JHTQSL7/eK0GfVSNIabzIZXRISqz606zwNk+v+l 9ozg== 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:date :message-id:subject:from:to:cc; bh=XWVLWgWRshJRz81yv8GH+Vk7GARsCfLMes4lvKmPk/k=; b=bnW5WTRkHgnPx70kKmQ1Q9o46VTNLTFSwW+OGpU44LjRTjdPx9DbWdZH9qBc0XESgH doRH6tHzbkToJQUJiKeYp2zx88YM2BB//cmnVBCgm5rAsZJDjjdjSiUE5Eijg5rTPtKi PBP5VJyHHB31uLeKMPeqtJw5+3MNjQaSN3Ev9w6wtV6CM/My/nQDsGBqvAa4k2Zgli4C hxjBGaCIx+LLsIMIBS1NBOC0F78lj6tLN2LGzJhVwMT0TnkBgTDz6zULu1iKAYRcZUF/ IzAVArhE3ESVZaSKR8KBYbpgm8h6oQEm8mMKPU2/3ul+946o737aknK2+KE7i2MzN5Wz ugGg== X-Gm-Message-State: AOPr4FUnYeAxf8car7dWPernsDWXkkamIyjDUuMzbWhc1YRg5iRiZY16yaZXvQ95yjSuQY+BTHo2RFpN8vWE5g== MIME-Version: 1.0 X-Received: by 10.31.204.196 with SMTP id c187mr8955096vkg.34.1462862667451; Mon, 09 May 2016 23:44:27 -0700 (PDT) Received: by 10.176.3.133 with HTTP; Mon, 9 May 2016 23:44:27 -0700 (PDT) In-Reply-To: References: Date: Mon, 9 May 2016 23:44:27 -0700 Message-ID: Subject: Re: tagging clients of zookeeper From: "Arun M. Krishnakumar" To: dev@zookeeper.apache.org Cc: user@zookeeper.apache.org Content-Type: multipart/alternative; boundary=001a114db688a617630532774124 archived-at: Tue, 10 May 2016 06:44:34 -0000 --001a114db688a617630532774124 Content-Type: text/plain; charset=UTF-8 Thanks for the info Michael Han. On Mon, May 9, 2016 at 9:56 PM, Michael Han 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 > 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. > --001a114db688a617630532774124--