Simple operation of ZooKeeper

There is a data model inside zookeeper, which is a hierarchical namespace; the namespace is similar to an ordinary file system, which is mainly used to store configuration information; the namespace has a root path “/”, There are also hierarchical nodes znode, each level node has data.

1. Shell operation zookeeper

1. Enter zookeeper operation command line: ./zkCli.sh

2, view: ls /

3. Create node zk, data For mydata: create /zk mydata, after creating it, use ls / to see more zk

4. Get data: get /zk, you can see that the data is mydata

5. Modify data: set /zk hello, after modification, use get /zk to See the data changed to hello


< /p>

6. Delete node: delete /zk, after deleting, use ls / find that zk is gone

Second, java operation zookeeper

http://www.voidcn.com/article/p-bqkmofqb-pz.html

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 4797 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.