Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Zookeeper >> mail # dev >> Dumping and loading Zookeeper data


Copy link to this message
-
Dumping and loading Zookeeper data
Hi,

I've been looking at a few options for dumping and loading Zookeeper data.
If anyone here can provide insight on the current state of tools and what I
should use, that would be great.

First, I tried zktreeutil from the zookeeper-bin (3.4.5) package:
zktreeutil -z localhost:2181 -E

I can connect to that address using telnet and another zookeeper dumping
tool
(guano), but zktreeutil gives me:

[zktreeutil] zooKeeper exception caught: Unable to connect to ZK running at
'localhost:2181'; state=999
terminate called after throwing an instance of '2013-05-01
10:55:38,990:18626(0x7f7240369700):ZOO_INFO@check_events@1703: initiated
connection to server [127.0.0.1:2181]
zktreeutil::ZooKeeperException'
  what():  Unable to connect to ZK running at 'localhost:2181'; state=999
Aborted (core dumped)

The above is running Ubuntu 12.04.1 LTS (Precise).

I noticed that there were several patches submitted to zktree-util ([1] and
[2]), but it seems none of them have been accepted - is the tool deprecated?

I then tried guano [3]. This tool dumped the zookeeper data to a folder
structure rather than XML, but it did seem to work. If I don't find other
options, I'll go with this, but since it's outside zookeeper core and was
last updated 10 months ago, I wasn't sure about it.

At StackOverflow [4], someone mentioned zkConfig.py, a "contributed project
when you install zookeeper", but I can't seem to find it in the current
code.
I did find zk_dump_tree.py in the current source code checkout, but it
seems
to use a separate REST server, which doesn't seem ideal.

That's as far as I've gotten in my investigation - kind of a confusing
picture, so any insights appreciated!

Thanks,
Dave.

[1] ZOOKEEPER-1218, Apr 2012 -
https://issues.apache.org/jira/browse/ZOOKEEPER-1218
[2] ZOOKEEPER-1445, May 2012 -
https://issues.apache.org/jira/browse/ZOOKEEPER-1445
[3] https://github.com/dietrichf/guano
[4] http://stackoverflow.com/questions/6394140/how-do-you-backup-zookeeper
+
Ivan Kelly 2013-05-06, 12:37
+
Dave Cahill 2013-05-22, 01:51
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB