Return-Path: X-Original-To: apmail-curator-user-archive@minotaur.apache.org Delivered-To: apmail-curator-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4E888172FB for ; Wed, 25 Feb 2015 09:08:16 +0000 (UTC) Received: (qmail 67037 invoked by uid 500); 25 Feb 2015 09:08:13 -0000 Delivered-To: apmail-curator-user-archive@curator.apache.org Received: (qmail 67000 invoked by uid 500); 25 Feb 2015 09:08:13 -0000 Mailing-List: contact user-help@curator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@curator.apache.org Delivered-To: mailing list user@curator.apache.org Received: (qmail 66990 invoked by uid 99); 25 Feb 2015 09:08:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Feb 2015 09:08:13 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of tan1986@gmail.com designates 209.85.216.43 as permitted sender) Received: from [209.85.216.43] (HELO mail-qa0-f43.google.com) (209.85.216.43) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Feb 2015 09:08:08 +0000 Received: by mail-qa0-f43.google.com with SMTP id bm13so1794769qab.2 for ; Wed, 25 Feb 2015 01:07:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=qlmBFroxZKiG/WhQ8vJ9QUoiAfuDVnHE9otSqc1aa7Q=; b=ck7u1i/hJSLW6Yq6NVbRphqXNW/4Smz8bTkSKCjrm6iKmApuoM78Qn46EmQ19nL4Y8 7PDCDyI4C7WDGK6zv1uLzMcqqWMh1K4frD0FV63zB3PCvSiOOx11m6GjIW2zNiqlL33v uYE7kCGCo3PalMQA9zG2wS5+Bt2BJQKyTSt32+I2W+UPpT6lC+35Zgxoco42mvUzijId DmrCt4BOne+W5l1eppPdsXRIr+/w7J0k4ycxvpmYeE5xMFKF+R7kZCJ5PdUfx+INEiyE ZBK/Vv16A+opZ1djPdXQLeOUeFjruTv/4BeR5+c9uf6ZnKHtAg1DMtPe41SCi/SpdM6L Zq9Q== X-Received: by 10.140.84.20 with SMTP id k20mr4542286qgd.45.1424855267848; Wed, 25 Feb 2015 01:07:47 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.25.184 with HTTP; Wed, 25 Feb 2015 01:07:27 -0800 (PST) In-Reply-To: References: From: Jipeng Tan Date: Wed, 25 Feb 2015 01:07:27 -0800 Message-ID: Subject: Re: Is there a way to find which machine holds lease file created by InterProcessSemaphoreMutex To: Jordan Zimmerman Cc: user@curator.apache.org Content-Type: multipart/alternative; boundary=001a11c12cfa18b6b3050fe5f861 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c12cfa18b6b3050fe5f861 Content-Type: text/plain; charset=UTF-8 Thanks for the promptly response. Can I do this in zookeeper CLI? Here is my zookeeper directory structure I have: /blah/TaskLocks/task-1/ /blah/TaskLocks/task-2/ /blah/TaskLocks/task-3/ .... /blah/TaskLocks/task-n/ task-1...n is defined as the root of my task directory. I believe curator creates two more directories (locks and leases) under task-1...n I first try yo get payload from the child from locks directory. However, there is no data. [zk: localhost:2181(CONNECTED) 155] get /blah/TaskLocks/task-1/locks cZxid = 0x1d301bc1ba ctime = Thu Feb 19 17:18:30 GMT-07:00 2015 mZxid = 0x1d301bc1ba mtime = Thu Feb 19 17:18:30 GMT-07:00 2015 pZxid = 0x1e00afb0ff cversion = 342702 dataVersion = 0 aclVersion = 0 ephemeralOwner = 0x0 dataLength = 0 *numChildren = 0* Did I do something wrong? Thanks, Jipeng On Tue, Feb 24, 2015 at 8:05 PM, Jordan Zimmerman < jordan@jordanzimmerman.com> wrote: > Unless you change it in the factory, the IP of the instance _is_ stored as > the payload for the lock file. You can getChildren on the lock parent, sort > them and get the payload of the first sorted child. > > -Jordan > > > > On February 24, 2015 at 10:58:16 PM, Jipeng Tan (tan1986@gmail.com) wrote: > > Hi, > > We use InterProcessSemaphoreMutex to make sure certain machine only > process certain Task. > > One issue I am currently facing is: sometimes a lease file for one Task > presents on Zookeeper, however, there is no machine process that Task after > zookeeper quorum is rebooted. > > Since we have hundreds of machines, it is quite hard to go over every > machine's log to figure out which machines own the lease file. > > So I wonder if there is a better way to find the association of machines > and lease files. Is that possible to add machines info (IP) to the Lock? > > Thanks, > Jipeng > > --001a11c12cfa18b6b3050fe5f861 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks for the=C2=A0promptly response.

= Can I do this in zookeeper CLI?

Here is my zookeep= er directory structure I have:

/blah/TaskLocks/tas= k-1/
/blah/TaskLocks/task-2/
/blah/T= askLocks/task-3/
....
/blah/TaskLocks/task-n/
=

task-1...n is defined as the root of my task directory.=

I believe curator creates two more directories (l= ocks and leases) under task-1...n

I first try yo g= et payload from the child from locks directory. However, there is no data.<= /div>


[zk: localhost:2181(CONNECTED)= 155] get /blah/TaskLocks/task-1/locks

cZxid =3D 0= x1d301bc1ba
ctime =3D Thu Feb 19 17:18:30 GMT-07:00 2015
mZxid =3D 0x1d301bc1ba
mtime =3D Thu Feb 19 17:18:30 GMT-07:00 = 2015
pZxid =3D 0x1e00afb0ff
cversion =3D 342702
dataVersion =3D 0
aclVersion =3D 0
ephemeralOwner = =3D 0x0
dataLength =3D 0
numChildren =3D 0
=

Did I do something wrong?


Thanks,
Jipeng

On Tue, Feb 24, 2015 at 8:05 PM, Jordan= Zimmerman <jordan@jordanzimmerman.com> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px= #ccc solid;padding-left:1ex">
Unless you change it in the factory, the IP of the = instance _is_ stored as the payload for the lock file. You can getChildren = on the lock parent, sort them and get the payload of the first sorted child= .

-Jordan
=



On Feb= ruary 24, 2015 at 10:58:16 PM, Jipeng Tan (tan1986@gmail.com) wrote:

Hi,

We use=C2=A0InterProcessSemaphoreMutex to make sure certain machine only process certain Task.=C2=A0

One issue I am currently facing is: sometimes a lease file for one Task presents on Zookeeper, however, there is no machine process that Task after zookeeper quorum is rebooted.

Since we have hundreds of machines, it is quite hard to go over every machine's log to figure out which machines own the lease file.

So I wonder if there is a better way to find the association of machines and lease files. Is that possible to add machines info (IP) to the Lock?

Thanks,
Jipeng

--001a11c12cfa18b6b3050fe5f861--