Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

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

avatar
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

avatar
Contributor

@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