

{"id":20760,"date":"2018-07-22T03:53:04","date_gmt":"2018-07-22T03:53:04","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=20760"},"modified":"2021-05-19T18:24:07","modified_gmt":"2021-05-19T12:54:07","slug":"zookeeper-cli","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/zookeeper-cli\/","title":{"rendered":"Apache ZooKeeper CLI (Command Line Interface) Operations"},"content":{"rendered":"<p><span style=\"font-weight: 400\">In our last <strong>Apache ZooKeeper Tutorial<\/strong>, we discussed <strong>ZooKeeper Leader Election<\/strong>. Today, we will see ZooKeeper CLI. In this Zookeeper article, we will learn the whole about ZooKeeper Command Line Interface. First, we will see what is CLI in ZooKeeper. <\/span><\/p>\n<p><span style=\"font-weight: 400\">Also, we will discuss commands in ZooKeeper CLI. Also, there are several operations we can perform with the ZooKeeper ensemble for development purpose, we will also discuss all in detail. <\/span><\/p>\n<p><span style=\"font-weight: 400\">So, let\u2019s start Apache ZooKeeper CLI.<\/span><\/p>\n<h2><span style=\"font-weight: 400\">What is ZooKeeper Command Line Interface?<\/span><\/h2>\n<p><span style=\"font-weight: 400\">For development purpose, we can interact with the ZooKeeper ensemble, so, for that, we use ZooKeeper CLI (Command Line Interface). Its main purpose is for debugging and working around with different options.<\/span><\/p>\n<p><span style=\"font-weight: 400\">In order to perform ZooKeeper CLI operations, at very first we have to turn on our ZooKeeper server (\u201cbin\/zkServer.sh start\u201d). Afterward, we will also turn on <strong>ZooKeeper client<\/strong> (\u201cbin\/zkCli.sh\u201d). Hence, we can perform the following operation, once the client starts:<\/span><\/p>\n<ol>\n<li><span style=\"font-weight: 400\"> Create znodes.<\/span><\/li>\n<li><span style=\"font-weight: 400\"> Get data.<\/span><\/li>\n<li>Watch znode for changes.<\/li>\n<li><span style=\"font-weight: 400\">Set data.<\/span><\/li>\n<li><span style=\"font-weight: 400\"> Create children of a znode.<\/span><\/li>\n<li><span style=\"font-weight: 400\"> List children of a znode.<\/span><\/li>\n<li>Check Status.<\/li>\n<li>Remove \/ Delete a znode.<\/li>\n<\/ol>\n<h2><span style=\"font-weight: 400\">Commands in ZooKeeper CLI<\/span><\/h2>\n<p>Let&#8217;s discuss ZooKeeper CLI Commands in detail:<\/p>\n<div id=\"attachment_20818\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Commands-in-ZooKeeper-CLI-01.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-20818\" class=\"wp-image-20818 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Commands-in-ZooKeeper-CLI-01.jpg\" alt=\"ZooKeeper CLI\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Commands-in-ZooKeeper-CLI-01.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Commands-in-ZooKeeper-CLI-01-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Commands-in-ZooKeeper-CLI-01-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Commands-in-ZooKeeper-CLI-01-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Commands-in-ZooKeeper-CLI-01-1024x536.jpg 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-20818\" class=\"wp-caption-text\">Commands in ZooKeeper CLI<\/p><\/div>\n<h3><span style=\"font-weight: 400\">i. Create Znodes<\/span><\/h3>\n<p><span style=\"font-weight: 400\">At very first, with the given path, create a znode. Basically, the flag argument specifies whether the created Znode will be ephemeral, persistent, or sequential. However, all znodes are persistent, by default.<\/span><\/p>\n<p><span style=\"font-weight: 400\">In addition, when a session expires or when the client disconnects, Ephemeral znodes (flag:e) will be automatically deleted.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Although, Sequential znodes make sure that the Znode path will be unique.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Along with 10 digit padding to the znode path, ZooKeeper ensemble will add the sequence number. For example, the znode path \/myapp will be converted to \/myapp0000000001 and the next sequence number will be \/myapp0000000002. If no flags are specified, then the znode is considered as persistent.<\/span><\/p>\n<p><span style=\"font-weight: 400\">a. Syntax<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">create \/path \/data<\/pre>\n<p><span style=\"font-family: Verdana, Geneva, sans-serif\">b. Sample<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">create \/FirstZnode \u201cMyfirstzookeeper-app\u201d<\/pre>\n<p><span style=\"font-weight: 400\">c. Output<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">[zk: localhost:2181(CONNECTED) 0] create \/FirstZnode \u201cMyfirstzookeeper-app\u201d\r\nCreated \/FirstZnode<\/pre>\n<p><span style=\"font-weight: 400\">Now, add -s flag, in order to create a Sequential znode:<\/span><br \/>\n<span style=\"font-weight: 400\">a. Syntax<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">create -s \/path \/data<\/pre>\n<p><span style=\"font-weight: 400\">b. Sample<\/span><br \/>\n<b><\/b><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">create -s \/FirstZnode second-data<\/pre>\n<p><span style=\"font-weight: 400\">c. Output<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">[zk: localhost:2181(CONNECTED) 2] create -s \/FirstZnode \u201csecond-data\u201d\r\nCreated \/FirstZnode0000000023<\/pre>\n<p><span style=\"font-weight: 400\">Further, add -e flag, to create an Ephemeral Znode:<\/span><br \/>\n<span style=\"font-weight: 400\">a. Syntax<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">create -e \/path \/data<\/pre>\n<p><span style=\"font-family: Verdana, Geneva, sans-serif\">b. Sample<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">create -e \/SecondZnode \u201cEphemeral-data\u201d<\/pre>\n<p><span style=\"font-weight: 400\">c. Output<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">[zk: localhost:2181(CONNECTED) 2] create -e \/SecondZnode \u201cEphemeral-data\u201d\r\nCreated \/SecondZnode<\/pre>\n<p><span style=\"font-weight: 400\">Although, make sure the ephemeral znode will be deleted when a client connection is lost. So, by quitting the ZooKeeper CLI and then re-opening the CLI, we can try it.<\/span><\/p>\n<h3><span style=\"font-weight: 400\">ii. Get Data<\/span><\/h3>\n<p><span style=\"font-weight: 400\">In order to get the associated data of the znode as well as metadata of the specified znode, we use this operation. Information like when the data was last modified, where it was modified, and all the information about the data, we can get from it. <\/span><\/p>\n<p><span style=\"font-weight: 400\">In addition, to assign watches to show notification about the data, we use this ZooKeper CLI Command.<\/span><\/p>\n<p><span style=\"font-weight: 400\">a. Syntax<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">get \/path<\/pre>\n<p><span style=\"font-weight: 400\">b. Sample<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">get \/FirstZnode<\/pre>\n<p><span style=\"font-weight: 400\">c. Output<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">[zk: localhost:2181(CONNECTED) 1] get \/FirstZnode\r\n\u201cMyfirstzookeeper-app\u201d\r\ncZxid = 0x7f\r\nctime = Tue Sep 29 16:15:47 IST 2015\r\nmZxid = 0x7f\r\nmtime = Tue Sep 29 16:15:47 IST 2015\r\npZxid = 0x7f\r\ncversion = 0\r\ndataVersion = 0\r\naclVersion = 0\r\nephemeralOwner = 0x0\r\ndataLength = 22\r\nnumChildren = 0<\/pre>\n<p><span style=\"font-weight: 400\">Though, we must enter the full path of the znode, to access a sequential znode:<\/span><br \/>\n<span style=\"font-weight: 400\">a. Sample<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">get \/FirstZnode0000000023<\/pre>\n<p><span style=\"font-weight: 400\">b. Output<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">[zk: localhost:2181(CONNECTED) 1] get \/FirstZnode0000000023\r\n\u201cSecond-data\u201d\r\ncZxid = 0x80\r\nctime = Tue Sep 29 16:25:47 IST 2015\r\nmZxid = 0x80\r\nmtime = Tue Sep 29 16:25:47 IST 2015\r\npZxid = 0x80\r\ncversion = 0\r\ndataVersion = 0\r\naclVersion = 0\r\nephemeralOwner = 0x0\r\ndataLength = 13\r\nnumChildren = 0<\/pre>\n<h3><span style=\"font-weight: 400\">iii. Watch<\/span><\/h3>\n<p><span style=\"font-weight: 400\">when the specified znode or znode\u2019s children data changes, the operatipon &#8220;Watches&#8221; show a notification. However, only in get command,\u00a0we can set a watch.<\/span><\/p>\n<p><span style=\"font-weight: 400\">a. Syntax<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">get \/path [watch] 1<\/pre>\n<p><span style=\"font-weight: 400\">b. Sample<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">get \/FirstZnode 1<\/pre>\n<p><span style=\"font-weight: 400\">c. Output<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">[zk: localhost:2181(CONNECTED) 1] get \/FirstZnode 1\r\n\u201cMyfirstzookeeper-app\u201d\r\ncZxid = 0x7f\r\nctime = Tue Sep 29 16:15:47 IST 2015\r\nmZxid = 0x7f\r\nmtime = Tue Sep 29 16:15:47 IST 2015\r\npZxid = 0x7f\r\ncversion = 0\r\ndataVersion = 0\r\naclVersion = 0\r\nephemeralOwner = 0x0\r\ndataLength = 22\r\nnumChildren = 0<\/pre>\n<p><span style=\"font-weight: 400\">Although, make sure the output for watch operation is\u00a0same as normal get command,\u00a0though it will wait for Znode changes in the background. &lt;Start here&gt;<\/span><\/p>\n<h3><span style=\"font-weight: 400\">iv. Set Data<\/span><\/h3>\n<p><span style=\"font-weight: 400\">As per its name, this operations sets the data of the specified znode.\u00a0We can check the data using the get CLI command in ZooKeeper, once\u00a0we finish this ZooKeeper set operation.<\/span><br \/>\n<span style=\"font-weight: 400\">a. Syntax<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">set \/path \/data<\/pre>\n<p><span style=\"font-weight: 400\">b. Sample<\/span><br \/>\n<b><\/b><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">set \/SecondZnode Data-updated<\/pre>\n<p><span style=\"font-weight: 400\">c. Output<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">[zk: localhost:2181(CONNECTED) 1] get \/SecondZnode \u201cData-updated\u201d\r\ncZxid = 0x82\r\nctime = Tue Sep 29 16:29:50 IST 2015\r\nmZxid = 0x83\r\nmtime = Tue Sep 29 16:29:50 IST 2015\r\npZxid = 0x82\r\ncversion = 0\r\ndataVersion = 1\r\naclVersion = 0\r\nephemeralOwner = 0x15018b47db00000\r\ndataLength = 14\r\nnumChildren = 0<\/pre>\n<p><span style=\"font-weight: 400\">If\u00a0we assign watch option in ZooKeeper CLI getting command, its output will be as same as below \u2212<\/span><\/p>\n<p><span style=\"font-weight: 400\">d. Output<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">[zk: localhost:2181(CONNECTED) 1] get \/FirstZnode \u201cMysecondzookeeper-app\u201d\r\nWATCHER: :\r\nWatchedEvent state:SyncConnected type:NodeDataChanged path:\/FirstZnode\r\ncZxid = 0x7f\r\nctime = Tue Sep 29 16:15:47 IST 2015\r\nmZxid = 0x84\r\nmtime = Tue Sep 29 17:14:47 IST 2015\r\npZxid = 0x7f\r\ncversion = 0\r\ndataVersion = 1\r\naclVersion = 0\r\nephemeralOwner = 0x0\r\ndataLength = 23\r\nnumChildren = 0<\/pre>\n<h3><span style=\"font-weight: 400\">v. Create Children \/ Sub-znode<\/span><\/h3>\n<p><span style=\"font-weight: 400\">Basically, creating children is\u00a0as same as creating new znodes. However, the only difference in both is that the path of the child znode will have the parent path as well.<\/span><br \/>\n<span style=\"font-weight: 400\">a. Syntax<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">create \/parent\/path\/subnode\/path \/data<\/pre>\n<p><span style=\"font-weight: 400\">b. Sample<\/span><br \/>\n<b><\/b><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">create \/FirstZnode\/Child1 firstchildren<\/pre>\n<p><b><\/b><span style=\"font-weight: 400\">c. Output<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">[zk: localhost:2181(CONNECTED) 16] create \/FirstZnode\/Child1 \u201cfirstchildren\u201d\r\ncreated \/FirstZnode\/Child1\r\n[zk: localhost:2181(CONNECTED) 17] create \/FirstZnode\/Child2 \u201csecondchildren\u201d\r\ncreated \/FirstZnode\/Child2<\/pre>\n<h3><span style=\"font-weight: 400\">vi. List Children<\/span><\/h3>\n<p><span style=\"font-weight: 400\">In order to list and display the children of a znode, we use this List Children ZooKeeper CLI command.<\/span><br \/>\n<span style=\"font-weight: 400\">a. Syntax<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">ls \/path<\/pre>\n<p><span style=\"font-family: Verdana, Geneva, sans-serif\">b. Sample<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">ls \/MyFirstZnode<\/pre>\n<p><span style=\"font-weight: 400\">c. Output<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">[zk: localhost:2181(CONNECTED) 2] ls \/MyFirstZnode\r\n[mysecondsubnode, myfirstsubnode]\r\n<\/pre>\n<h3><span style=\"font-weight: 400\">vii. Check Status<\/span><\/h3>\n<p><span style=\"font-weight: 400\">Here, Status\u00a0refers to the metadata of a specified znode. It consists of several details like Timestamp, Version number, ACL, Data length, and Children znode\u00a0as well.<\/span><br \/>\n<span style=\"font-weight: 400\">a. Syntax<\/span><\/p>\n<pre class=\"EnlighterJSRAW\">stat \/path<\/pre>\n<p><span style=\"font-weight: 400\">b. Sample<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">stat \/FirstZnode<\/pre>\n<p><span style=\"font-weight: 400\">c. Output<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">[zk: localhost:2181(CONNECTED) 1] stat \/FirstZnode\r\ncZxid = 0x7f\r\nctime = Tue Sep 29 16:15:47 IST 2015\r\nmZxid = 0x7f\r\nmtime = Tue Sep 29 17:14:24 IST 2015\r\npZxid = 0x7f\r\ncversion = 0\r\ndataVersion = 1\r\naclVersion = 0\r\nephemeralOwner = 0x0\r\ndataLength = 23\r\nnumChildren = 0<\/pre>\n<h3><span style=\"font-weight: 400\">viii. Remove a Znode<\/span><\/h3>\n<p><span style=\"font-weight: 400\">The operation, &#8220;Remove a Znode&#8221;, removes a specified znode and recursively all its children as well. However, only if such a znode is available, this would happen.<\/span><\/p>\n<p>a. Syntax<\/p>\n<pre class=\"EnlighterJSRAW\">rmr \/path<\/pre>\n<p>b. Sample<br \/>\n<b><\/b><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">rmr \/FirstZnode<\/pre>\n<p>c. Output<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">[zk: localhost:2181(CONNECTED) 10] rmr \/FirstZnode\r\n[zk: localhost:2181(CONNECTED) 11] get \/FirstZnode\r\nNode does not exist: \/FirstZnode<\/pre>\n<p><span style=\"font-weight: 400\">Though we can say except for the fact that it works only on znodes with no children, Delete (delete \/path) command is\u00a0same as remove command in Apache ZooKeeper Command-Line Interface.<\/span><\/p>\n<p>So, this was all in ZooKeeper CLI. Hope you like our explanation of ZooKeeper Command-Line Operations.<\/p>\n<h2><span style=\"font-weight: 400\">Conclusion<\/span><\/h2>\n<p>Hence, in this ZooKeeper CLI tutorial, we discussed all the operations and the concept of ZooKeeper Command Line Interface. Hope it helps. Still, if any doubt regarding Apache ZooKeeper CLI, ask in the comment tab.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In our last Apache ZooKeeper Tutorial, we discussed ZooKeeper Leader Election. Today, we will see ZooKeeper CLI. In this Zookeeper article, we will learn the whole about ZooKeeper Command Line Interface. First, we will&#46;&#46;&#46;<\/p>\n","protected":false},"author":7,"featured_media":20831,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[77],"tags":[2489,2565,2566,2679,3054,3107,5078,8317,9346,11510,12765,15420,16376,16377,16378,16380,16383],"class_list":["post-20760","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-zookeeper","tag-check-status","tag-cli-in-apache-zookeeper","tag-cli-in-zookeeper","tag-commands-in-zookeeper-cli","tag-create-children-sub-znode","tag-create-znodes","tag-get-data","tag-list-children","tag-output","tag-remove-a-znode","tag-set-data","tag-watch","tag-zookeeper-cli","tag-zookeeper-cli-commands","tag-zookeeper-client","tag-zookeeper-copy-znode","tag-zookeeper-delete-all-data"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Apache ZooKeeper CLI (Command Line Interface) Operations - DataFlair<\/title>\n<meta name=\"description\" content=\"ZooKeeper CLI tutorial, What is ZooKeeper Command-Line Interface, commands in ZooKeeper CLI, CLI in ZooKeeper Operations, ZooKeeper tutorial.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/zookeeper-cli\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Apache ZooKeeper CLI (Command Line Interface) Operations - DataFlair\" \/>\n<meta property=\"og:description\" content=\"ZooKeeper CLI tutorial, What is ZooKeeper Command-Line Interface, commands in ZooKeeper CLI, CLI in ZooKeeper Operations, ZooKeeper tutorial.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/zookeeper-cli\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-07-22T03:53:04+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-05-19T12:54:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/ZooKeeper-Command-Line-Interface-01.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Apache ZooKeeper CLI (Command Line Interface) Operations - DataFlair","description":"ZooKeeper CLI tutorial, What is ZooKeeper Command-Line Interface, commands in ZooKeeper CLI, CLI in ZooKeeper Operations, ZooKeeper tutorial.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/zookeeper-cli\/","og_locale":"en_US","og_type":"article","og_title":"Apache ZooKeeper CLI (Command Line Interface) Operations - DataFlair","og_description":"ZooKeeper CLI tutorial, What is ZooKeeper Command-Line Interface, commands in ZooKeeper CLI, CLI in ZooKeeper Operations, ZooKeeper tutorial.","og_url":"https:\/\/data-flair.training\/blogs\/zookeeper-cli\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2018-07-22T03:53:04+00:00","article_modified_time":"2021-05-19T12:54:07+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/ZooKeeper-Command-Line-Interface-01.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/zookeeper-cli\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/zookeeper-cli\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/beb0cab24b7aa54423a3b50e669a9dcd"},"headline":"Apache ZooKeeper CLI (Command Line Interface) Operations","datePublished":"2018-07-22T03:53:04+00:00","dateModified":"2021-05-19T12:54:07+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/zookeeper-cli\/"},"wordCount":834,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/zookeeper-cli\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/ZooKeeper-Command-Line-Interface-01.jpg","keywords":["Check Status","CLI in Apache ZooKeeper","CLI in ZooKeeper","Commands in ZooKeeper CLI","Create Children \/ Sub-znode","Create Znodes","Get Data","List Children","Output","Remove a Znode","Set Data","Watch","ZooKeeper CLI","ZooKeeper CLI Commands","zooKeeper client","ZooKeeper copy znode","ZooKeeper delete all data"],"articleSection":["Zookeeper Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/zookeeper-cli\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/zookeeper-cli\/","url":"https:\/\/data-flair.training\/blogs\/zookeeper-cli\/","name":"Apache ZooKeeper CLI (Command Line Interface) Operations - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/zookeeper-cli\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/zookeeper-cli\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/ZooKeeper-Command-Line-Interface-01.jpg","datePublished":"2018-07-22T03:53:04+00:00","dateModified":"2021-05-19T12:54:07+00:00","description":"ZooKeeper CLI tutorial, What is ZooKeeper Command-Line Interface, commands in ZooKeeper CLI, CLI in ZooKeeper Operations, ZooKeeper tutorial.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/zookeeper-cli\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/zookeeper-cli\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/zookeeper-cli\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/ZooKeeper-Command-Line-Interface-01.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/ZooKeeper-Command-Line-Interface-01.jpg","width":1200,"height":628,"caption":"Apache ZooKeeper CLI (Command Line Interface) Operations"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/zookeeper-cli\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"sas date informats","item":"https:\/\/data-flair.training\/blogs\/tag\/sas-date-informats\/"},{"@type":"ListItem","position":3,"name":"Apache ZooKeeper CLI (Command Line Interface) Operations"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/beb0cab24b7aa54423a3b50e669a9dcd","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c322416204232f4dd97ef3901b0a499a5d34d7ba7fe333f4bfe53a907873d293?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c322416204232f4dd97ef3901b0a499a5d34d7ba7fe333f4bfe53a907873d293?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c322416204232f4dd97ef3901b0a499a5d34d7ba7fe333f4bfe53a907873d293?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team specializes in creating clear, actionable content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Backed by industry expertise, we make learning easy and career-oriented for beginners and pros alike.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam3\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/20760","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=20760"}],"version-history":[{"count":6,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/20760\/revisions"}],"predecessor-version":[{"id":94230,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/20760\/revisions\/94230"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/20831"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=20760"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=20760"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=20760"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}