zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "maoling (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ZOOKEEPER-2634) null data in zknode data
Date Mon, 27 Aug 2018 03:10:00 GMT

    [ https://issues.apache.org/jira/browse/ZOOKEEPER-2634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16593153#comment-16593153
] 

maoling commented on ZOOKEEPER-2634:
------------------------------------

[~nayeemsmd]

The data in zknode data is allowed to be *null.* The *EndOfStreamException* may be unrelated.

> null data in zknode data
> ------------------------
>
>                 Key: ZOOKEEPER-2634
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2634
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: java client
>    Affects Versions: 3.4.5
>         Environment: linux zookeeper 3.4.5
>            Reporter: nayeem
>            Priority: Major
>
> We can create zk node with null data as given bellow.
> ZkConnect connector = new ZkConnect();
> ZooKeeper zk = connector.connect("host:port");
> String newNode = "/nayeemDate3";
> String strdata = String.valueOf('\u0000');
> connector.createNode(newNode, strdata.getBytes());
> When we get the data for the zknode
> 2016-11-17 23:55:48,926 [myid:] - WARN  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:5181:NIOServerCnxn@349]
- caught end of stream exception
> EndOfStreamException: Unable to read additional data from client sessionid 0x1585061acbd0613,
likely client has closed socket
>         at org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn.java:220)
>         at org.apache.zookeeper.server.NIOServerCnxnFactory.run(NIOServerCnxnFactory.java:208)
>         at java.lang.Thread.run(Thread.java:745)
> 2016-11-17 23:55:48,926 [myid:] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:5181:NIOServerCnxn@1001]
- Closed socket connection for client /10.10.72.93:48005 which had sessionid 0x1585061acbd0613
> To resolve the issue workaround is to delete the zknode, 
> is it the right behaviour or is this a bug.
> data from zkcli 
> [zk: 10.10.72.93:5181(CONNECTED) 1] ls /nayeemDate3
> []
> [zk: 10.10.72.93:5181(CONNECTED) 2] get /nayeemDate3
> null
> cZxid = 0xdc47
> ctime = Fri Nov 18 13:29:43 IST 2016
> mZxid = 0xdc47
> mtime = Fri Nov 18 13:29:43 IST 2016
> pZxid = 0xdc47
> cversion = 0
> dataVersion = 0
> aclVersion = 0
> ephemeralOwner = 0x0
> dataLength = 0
> numChildren = 0
> [zk: 10.10.72.93:5181(CONNECTED) 3] stat /nayeemDate3
> cZxid = 0xdc47
> ctime = Fri Nov 18 13:29:43 IST 2016
> mZxid = 0xdc47
> mtime = Fri Nov 18 13:29:43 IST 2016
> pZxid = 0xdc47
> cversion = 0
> dataVersion = 0
> aclVersion = 0
> ephemeralOwner = 0x0
> dataLength = 0
> numChildren = 0
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message