Support Questions

Find answers, ask questions, and share your expertise

How to access node names with space in zookeeper

avatar
Contributor

Hello,

I want to access the zookeeper using zkCli.sh and using following command:

ls /

This shows list of nodes connected. When I further do ls node1, I am able to see next internal node. (say subnode1).

If the subnode1 is named "sub node1" (with a white space in between), how do I access the sub node1. It shows message that file/directory not found.

1 REPLY 1

avatar
Super Guru

@Jatin Kheradiya try this way

/usr/hdp/current/zookeeper-server/bin/zkCli.sh -server localhost:2181 -c create "/hello 1" "hvalue"

/usr/hdp/current/zookeeper-server/bin/zkCli.sh -server localhost:2181 -c get "/hello 1"