Return-Path: X-Original-To: apmail-zookeeper-user-archive@www.apache.org Delivered-To: apmail-zookeeper-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AC1A11964A for ; Wed, 13 Apr 2016 08:20:23 +0000 (UTC) Received: (qmail 83857 invoked by uid 500); 13 Apr 2016 08:20:23 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 83798 invoked by uid 500); 13 Apr 2016 08:20:23 -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 83787 invoked by uid 99); 13 Apr 2016 08:20:22 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Apr 2016 08:20:22 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 3ECAD1A0C95 for ; Wed, 13 Apr 2016 08:20:22 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.72 X-Spam-Level: X-Spam-Status: No, score=-0.72 tagged_above=-999 required=6.31 tests=[HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id TbZp071Q6mBO for ; Wed, 13 Apr 2016 08:20:20 +0000 (UTC) Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id CE1B15F1E7 for ; Wed, 13 Apr 2016 08:20:19 +0000 (UTC) Received: by mail-wm0-f67.google.com with SMTP id a140so11690663wma.2 for ; Wed, 13 Apr 2016 01:20:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=RP3xuCdbtmelCQiqvHnPFmXY0veSp+Omkw2bvfXUpuA=; b=FbH2vVDzeCzd5yH9rKDzCPSDDQ+YYGDFUmLjKhFVgZTt/1NagtMuHYgIc9cKbKE457 VX0De2xaKhGWi3RR/FiBQGnjsh0V+tPWVu6I5JL2poZ3XAfMPf8IPqjDW4CkNuRpv52h slkIAninwEAE3EMhVuqt6amuo81/3l10g/9cJq1eVusPe+ESBgR19uJ2rXGN9ty3gDWU H/3VR9OzTUUFIfmWJJmUb+D78lsTL0ge2Tt53kgrf355jsNOkLQdrrwfPHlxEWaA32Xj 19dppjkt5DPQirLJ2Y2IsYL0pj0DlNQubk1dfRuEZkV9yUOCRKJKq0wvbXn4jvvSKZIO 58sg== X-Gm-Message-State: AOPr4FVXd63kGM+F9AlXoco+d7mtgITK7+blO4ZSNILPcyRUL6FWS/Z2itgmghEUWSJitQ== X-Received: by 10.194.246.137 with SMTP id xw9mr9084656wjc.172.1460535618639; Wed, 13 Apr 2016 01:20:18 -0700 (PDT) Received: from [192.168.1.64] (host86-165-77-128.range86-165.btcentralplus.com. [86.165.77.128]) by smtp.gmail.com with ESMTPSA id gl8sm37359994wjb.30.2016.04.13.01.20.17 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Apr 2016 01:20:17 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: Code to Simulate ZooKeeper Session Expiration does not Work From: Flavio Junqueira In-Reply-To: <33529987be04487a877302f32e12d56c@EXC01-Arezzo.diennea.lan> Date: Wed, 13 Apr 2016 09:20:15 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <1460532872.20835.10.camel@diennea.com> <33529987be04487a877302f32e12d56c@EXC01-Arezzo.diennea.lan> To: user@zookeeper.apache.org X-Mailer: Apple Mail (2.2104) Are you sure serviceZKSessionId is valid? -Flavio > On 13 Apr 2016, at 08:39, Matteo Casadei - Diennea = wrote: >=20 > Hi everybody, >=20 > I have an issue on testing ZooKeeper's session expiration. >=20 > Basically, I am using the chunk of code below to make a "target" > ZooKeeper handle expire: >=20 >=20 > ... > final ZooKeeper zk =3D new ZooKeeper(zkAddress , zkTimeout, new = Watcher() { >=20 > @Override > public void process(WatchedEvent event) { > System.out.println("Received event: " + event); >=20 > } >=20 > }, serviceZKSessionId, serviceZKpasswd); >=20 > while (zk.getState() !=3D States.CONNECTED) { > Thread.sleep(100); > } > zk.close(); > ... >=20 >=20 > however when running the code above, the only event a receive is an = expired event while the target ZooKeeper handle (the one I want to = actually expire) simply gets disconnected and immediately reconnected = afterwards. >=20 > Can anybody give me a clue on what is actually wrong with this code? >=20 >=20 > Thanks in advance, > Matteo >=20 > -- > Matteo Casadei >=20 > ________________________________ >=20 > Iscriviti alla nostra newsletter per rimanere aggiornato su digital ed = email marketing! http://www.magnews.it/newsletter/ >=20 > The information in this email is confidential and may be legally = privileged. If you are not the intended recipient please notify the = sender immediately and destroy this email. Any unauthorized, direct or = indirect, disclosure, copying, storage, distribution or other use is = strictly forbidden.