Why is my node considered so high and fits Zookeeper?

When I start telnet 127.0.0.1 2181

and use the 4 command command. Everything that gets printed makes sense to me except my Node account which is at 542 and every time I run my program I go up.

Does this mean I have persistent nodes lying around that I need to clean up?

I am using the O'Reilly Zookeeper book and I am using the "AdminClient" class and I print out all possible nodes and everything is deleted before my program is closed with zk.delete()

.

I'm new to zookeeper so any ideas on what's going on or best practices are appreciated.

UPDATE Does anyone have a method for checking nodes in a zookeeper instance? There must be a way to see which nodes exist without knowing the path in advance.

+3


source to share


2 answers


There is a command line utility /opt/zookeeper/current/bin/zkCli.sh that allows you to navigate the zookeeper node hierarchy like a filesystem. Run it on any box with ZK installed and then in the ZK console use commands like ls, get, set, rmr, etc. A complete list of supported commands and tgeir syntax can be displayed by running the help command. See http://zookeeper.apache.org/doc/trunk/zookeeperStarted.html for details



+3


source


These are znodes cf. https://zookeeper.apache.org/doc/r3.4.6/zookeeperProgrammers.html#sc_zkDataModel_znodes

$ echo srvr | nc localhost 2181

Zookeeper version: 3.3.0-925362, built on 03/19/2010 18:38 GMT
Latency min/avg/max: 0/8/76
Received: 17
Sent: 16
Outstanding: 0
Zxid: 0x300000002
Mode: follower
Node count: 4

      



  • version - 3.3.0
  • min / avg / max latencies for this server in milliseconds. This indicates the time it takes for the server to respond to the client's request.
  • number of client requests (usually transactions)
  • received the number of sent client packets (replies and notifications)
  • unsatisfactory number of requests in the queue, this increases when the server is under load and receives longer requests than it can handle, i.e. the request queue
  • zxid - global (cluster) transaction identifier. The upper 32 bits of which are the epoch number (changes with manual change) and the lower 32 bits, which are the proper xid
  • indicates service mode, usually master / follower, but can be standalone if the ensemble is not running
  • node count - number of znodes in the ZooKeeper namespace (data)

taken from https://phunt1.wordpress.com/category/zookeeper/

0


source







All Articles