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 436B3200BDF for ; Sun, 18 Dec 2016 18:06:01 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 4201A160B30; Sun, 18 Dec 2016 17:06:01 +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 8BF4A160AF6 for ; Sun, 18 Dec 2016 18:06:00 +0100 (CET) Received: (qmail 72518 invoked by uid 500); 18 Dec 2016 17:05:54 -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 72506 invoked by uid 99); 18 Dec 2016 17:05:54 -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; Sun, 18 Dec 2016 17:05:54 +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 023E1C2139 for ; Sun, 18 Dec 2016 17:05:54 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.02 X-Spam-Level: X-Spam-Status: No, score=-0.02 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=jordanzimmerman-com.20150623.gappssmtp.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 o4K9YW-_aOc4 for ; Sun, 18 Dec 2016 17:05:52 +0000 (UTC) Received: from mail-ua0-f178.google.com (mail-ua0-f178.google.com [209.85.217.178]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 01B485F2F1 for ; Sun, 18 Dec 2016 17:05:51 +0000 (UTC) Received: by mail-ua0-f178.google.com with SMTP id 3so67290379uaz.3 for ; Sun, 18 Dec 2016 09:05:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jordanzimmerman-com.20150623.gappssmtp.com; s=20150623; h=from:content-transfer-encoding:mime-version:subject:date:references :to:in-reply-to:message-id; bh=c3ARXtXh3MWfdhpRpjLlTxRF0vuV1d0JX17GRjhEUh0=; b=NWW8MNd2DRKYBQmBOZbxNEUE5rI9D+LGD102GXM52wX4ALu2fz6IjtW7fU9uZZgRxC lHy22XkRYZJaU5moFFCbGg5EidOywoFM4qUh/dKzuEVNNMfykiV1sXjq3CqmdYHyMHF7 cgnu6cXI57D6ofh68SJ4WQAziUYNcoEzHeEgVfTVDVZ47crot2+Sw73cvDWi34yuh2Ff t2cf8KZybNauNWEGUTFyBx4GvN+U1YvlWPh9vbvoXc/xMJwX0UYSgj9XbiJ3RuUXFln8 iHfDeze8YC0vRTevc6prr4U/GRuVh2gELqwo1+u02bZFyOUUN8lHUQkz8/Uy0Pf10FOl Jclw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:date:references:to:in-reply-to:message-id; bh=c3ARXtXh3MWfdhpRpjLlTxRF0vuV1d0JX17GRjhEUh0=; b=SjZh9crprypMhI6Ns4q3Cuy74bdrEJ9INLp5+LTl8/rzdZsCPjXFdQfRvQNjpwTRbw MaFS0N1mEVXctOZKMMnoGdwDKX336imzLVpXMYZzJmLbIb4itVH+Q0b+cj5a9xYsODOm pCkSA+g5fh8IDXD4ajC0PLISBJsmLfHyF/qCUj4KFgweMHJOLtTXrkwtWqD3IJpPrJDv r9LGU2P1YhSVQAdJGOqJ4nQ27ouQ5hFyCQcuT4w3dZXHUrB9tFBzMIP8YAftgC/F9ZGO OZWeCNldVUUHmWGdu7jDE9ehkdM2BU7g/uUXafIN240KKShJlkukXA6hbSc0IN90qsuJ SUYQ== X-Gm-Message-State: AIkVDXKH7Ifq233hLmLPzBDndLhUfqxTsGfURbQPEgsg6L/5/fA24cCPtGQ46mZH97y0kQ== X-Received: by 10.176.85.25 with SMTP id t25mr5372470uaa.83.1482080750302; Sun, 18 Dec 2016 09:05:50 -0800 (PST) Received: from [10.0.1.85] ([186.72.10.77]) by smtp.gmail.com with ESMTPSA id k187sm3865027vka.16.2016.12.18.09.05.48 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Dec 2016 09:05:49 -0800 (PST) From: Jordan Zimmerman Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) Subject: Re: identifying container nodes Date: Sun, 18 Dec 2016 12:05:47 -0500 References: To: user@zookeeper.apache.org In-Reply-To: Message-Id: <2D58AAD7-9256-4298-9FB1-CDBBFD6FC5F8@jordanzimmerman.com> X-Mailer: Apple Mail (2.3251) archived-at: Sun, 18 Dec 2016 17:06:01 -0000 Sadly, no. There needs to be a new API added to get the metadata for a = node. When Container (and now TTL) nodes were added we didn=E2=80=99t = want to break binary compatibility so the metastate is shoehorned into = the ephemeralOwner value using the high bits. So as not to break = existing clients those bits are masked away when returning the Stat = value to clients. -JZ > On Dec 18, 2016, at 12:03 PM, Hadriel Kaplan = wrote: >=20 > Howdy, > Is there some way for us to identify a node as being a Container node, = distinct from persistent or ephemeral nodes, via a client? >=20 > Inside of the server, it stores the client's session number in the = ephemeral owner ID for ephemeral nodes, a value of 0 to identify = persistent nodes, and a value of CONTAINER_EPHEMERAL_OWNER (a = Long.MIN_VALUE) to identify Container nodes. But when passing back the = Stat structure of Container nodes to clients, it uses 0 instead of the = Long.MIN_VALUE, making it appear as a persistent node to the client. Is = there some reason for this behavior? >=20 > It seems easy enough for me to change that behavior for my own use, in = DataNode.copyStat(), but I'm concerned about making this change if = there's some good reason it was being faked out. >=20 > -hadriel >=20