You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Patrick Hunt (JIRA)" <ji...@apache.org> on 2016/09/08 22:36:20 UTC
[jira] [Resolved] (ZOOKEEPER-2568) Node created having name with
space is not deleted with delete command
[ https://issues.apache.org/jira/browse/ZOOKEEPER-2568?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Patrick Hunt resolved ZOOKEEPER-2568.
-------------------------------------
Resolution: Information Provided
Surround the path in quotes:
{noformat}
[zk: localhost:2181(CONNECTED) 6] create "/MyNodeFri Aug 12 09:42:16 GMT+05:30 2016"
Created /MyNodeFri Aug 12 09:42:16 GMT+05:30 2016
[zk: localhost:2181(CONNECTED) 7] ls /
[MyNodeFri Aug 12 09:42:16 GMT+05:30 2016, a, foo, zookeeper]
[zk: localhost:2181(CONNECTED) 8] delete "/MyNodeFri Aug 12 09:42:16 GMT+05:30 2016"
[zk: localhost:2181(CONNECTED) 9] ls /
[a, foo, zookeeper]
[zk: localhost:2181(CONNECTED) 10]
{noformat}
> Node created having name with space is not deleted with delete command
> ----------------------------------------------------------------------
>
> Key: ZOOKEEPER-2568
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2568
> Project: ZooKeeper
> Issue Type: Bug
> Components: java client, server
> Affects Versions: 3.4.6
> Environment: In java using
> Reporter: Prabhunath Yadav
> Priority: Minor
>
> For Example :
> String myNode="/MyNode"+new Date() ;
> connector.createNode(newNode, new Date().toString().getBytes());
> and createNode is defined as:
> public void createNode(String path, byte[] data) throws Exception
> {
> zk.create(path, data, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
> }
> if we delete the node from command
> delete /MyNodeFri Aug 12 09:42:16 GMT+05:30 2016
> then we get exception saying
> Command failed:java.lang.NumberFormatException: for input string : "Aug"
> How to delete such node ? may rmr command can remove but why delete command not working ?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)