Is there any way to distinguish CONTAINER and PERSISTENT nodes programatically 
using Zookeeper client?

We can specify either of the two using CREATE_MODE:

   zookeeper.create("/containerNode",  new byte[0], 
ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.CONTAINER); 
zookeeper.create("/persistentNode",  new byte[0], ZooDefs.Ids.OPEN_ACL_UNSAFE, 
CreateMode.PERSISTENT);

But I see no way to distinguish the two of them via zookeeper client, once they 
are created. The stats seem to be equal. Even the ephemeralOwner is 0x0 in both 
cases, which is strange, because, according to the documentation, it should be 
0x8000000000000000L for containers 
(https://zookeeper.apache.org/doc/r3.5.5/api/org/apache/zookeeper/server/EphemeralType.html).

Strangely enough, Zookeeper server must have some way to distinguish the 
containers, because they are automatically reaped after 
"znode.container.maxNeverUsedIntervalMs" Interval (I'm using versión 3.6.0). 
So, ¿any way to find out which znodes are containers in the client side?

  [zk: localhost(CONNECTED) 24] get -s /containerNode
  cZxid = 0x100000035
  ctime = Wed Apr 08 10:27:07 UTC 2020
  mZxid = 0x100000035
  mtime = Wed Apr 08 10:27:07 UTC 2020
  pZxid = 0x100000035
  cversion = 0
  dataVersion = 0
  aclVersion = 0
  ephemeralOwner = 0x0
  dataLength = 0
  numChildren = 0


Thank you and regards,
Aritz

________________________________

Este mensaje y sus adjuntos se dirigen exclusivamente a su destinatario, puede 
contener información privilegiada o confidencial y es para uso exclusivo de la 
persona o entidad de destino. Si no es usted. el destinatario indicado, queda 
notificado de que la lectura, utilización, divulgación y/o copia sin 
autorización puede estar prohibida en virtud de la legislación vigente. Si ha 
recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente 
por esta misma vía y proceda a su destrucción.

The information contained in this transmission is privileged and confidential 
information intended only for the use of the individual or entity named above. 
If the reader of this message is not the intended recipient, you are hereby 
notified that any dissemination, distribution or copying of this communication 
is strictly prohibited. If you have received this transmission in error, do not 
read it. Please immediately reply to the sender that you have received this 
communication in error and then delete it.

Esta mensagem e seus anexos se dirigem exclusivamente ao seu destinatário, pode 
conter informação privilegiada ou confidencial e é para uso exclusivo da pessoa 
ou entidade de destino. Se não é vossa senhoria o destinatário indicado, fica 
notificado de que a leitura, utilização, divulgação e/ou cópia sem autorização 
pode estar proibida em virtude da legislação vigente. Se recebeu esta mensagem 
por erro, rogamos-lhe que nos o comunique imediatamente por esta mesma via e 
proceda a sua destruição

Reply via email to