zookeeper icon indicating copy to clipboard operation
zookeeper copied to clipboard

ZOOKEEPER-3583:Add new apis to get node type and ttl time info

Open maoling opened this issue 6 years ago • 1 comments

  • Add new apis: getStatPersisted, getTTL, getNodeType in the ZooKeeper.java
  • Currently, the ephemeralOwner of stat returned from java native client is not the actual one, due to the method DataNode#getClientEphemeralOwner, I cannot change it for the compatibility.
  • getStatPersisted mainly is used for getting the actual ephemeralOwner stored in the disk, Only use the actual ephemeralOwner stored in the disk, can we get the node type and ttl time info.
  • stat -d /path to show more details about a node
  • NOTE: for TTL node, get EPHEMERAL when extendedTypesEnabled disable, get PERSISTENT_WITH_TTL when extendedTypesEnabled enable in the client side. For example: setting -Dzookeeper.extendedTypesEnabled=true in the zkCli.sh
  • more details in the ZOOKEEPER-3583

maoling avatar Oct 25 '19 06:10 maoling

Refer to this link for build results (access rights to CI server needed): https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-build-maven/1674/

asf-ci avatar Dec 02 '19 04:12 asf-ci