Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to find owner of special lock in Zookeeper which decides Active Name node

Highlighted

How to find owner of special lock in Zookeeper which decides Active Name node

Contributor

Hi,

I am trying to figure out if by any means can I get the owner of the special ephemeral znode created in Zookeeper.

I see below in my server

[zk: localhost:2181(CONNECTED) 8] ls / [registry, hiveserver2, zookeeper, templeton-hadoop, hadoop-ha, rmstore]

[zk: localhost:2181(CONNECTED) 9] get /hadoop-ha

cZxid = 0x300000003 ctime = Sun Mar 26 09:56:02 PDT 2017 mZxid = 0x300000003 mtime = Sun Mar 26 09:56:02 PDT 2017 pZxid = 0x300000004 cversion = 1 dataVersion = 0 aclVersion = 0 ephemeralOwner = 0x0 dataLength = 0 numChildren = 1 [zk: localhost:2181(CONNECTED) 10]

How can I figure out which node or process or user owns the znode hadoop-ha???

1 REPLY 1

Re: How to find owner of special lock in Zookeeper which decides Active Name node

Explorer

@Sriram Hadoop

There doesn't seem to be an easy way to find the owner of ephemeral nodes in Zookeeper. You could still take a look at this link, it seems useful. http://zookeeper-user.578899.n2.nabble.com/Identify-ephemeral-node-owner-td6221016.html

I also an open issue related to this, but no progress on it for years.

https://issues.apache.org/jira/browse/ZOOKEEPER-1587

https://issues.apache.org/jira/browse/ZOOKEEPER-829

Don't have an account?
Coming from Hortonworks? Activate your account here