博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
install and use zookeeper C client API
阅读量:5115 次
发布时间:2019-06-13

本文共 1692 字,大约阅读时间需要 5 分钟。

1. install zookeeper in cluster

参考前面的STORM安装 

2. install zookeerper C client API

cd zookeeper-3.3.5/src/c

autoreconf -if

If this happens, we need install cppunit1.10.2  .

$ autoreconf -if>> aclocal:configure.ac:33: warning: macro `AM_PATH_CPPUNIT' not found in>> library>> aclocal:configure.ac:33: warning: macro `AM_PATH_CPPUNIT' not found in>> library>> configure.ac:33: error: possibly undefined macro: AM_PATH_CPPUNIT>>       If this token and others are legitimate, please use m4_pattern_allow.>>       See the Autoconf documentation.>> autoreconf: /usr/bin/autoconf failed with exit status: 1 We can see there is no directory named with /usr/local/share/aclocal.

2.1 install cppuint1.10.2

download cppunit-cvs-1.10.2.tar.gz

tar xzvf cppunit-cvs-1.10.2.tar.gz

cd cppunit-cvs-1.10.2

sh autogen.sh

./configure

make && make install

So cppuint1.10.2 has been installed in /usr/local/share/aclocal.

 

We continue to install zookeeper C client API. See  

ACLOCAL="aclocal -I /usr/local/share/aclocal" autoreconf -if

./configure

make && make install

 

3. use zookeeper C client API

cd zookeeper-3.3.5/src/c/src/

there is a file cli.c, we can compile it into a binary, cli, with the following Makefile.

[Torstan]# more Makefile

all:
g++ -c -I/usr/local/include/c-client-src -I/usr/local/zookeeper-3.3.5/src/c/include cli.c
g++ -o cli cli.o /usr/local/lib/libzookeeper_st.a
clean:
rm cli cli.o

 

make clean; make

[Torstan]# ./cli 127.0.0.1:2181

Watcher -1 state = CONNECTED_STATE
Got a new session id: 0x3d3564f27e0021
ls /
time = 0 msec
/: rc = 0
hello
storm
zookeeper
zk_test ginobili
time = 0 msec

 

For more information, please refer to 

转载于:https://www.cnblogs.com/Torstan/archive/2013/04/17/3026889.html

你可能感兴趣的文章
《Apache之访问本地用户家目录》——RHEL6.3
查看>>
【Java】synchronized与lock的区别
查看>>
django高级应用(分页功能)
查看>>
【转】Linux之printf命令
查看>>
关于PHP会话:session和cookie
查看>>
Chrome development tools学习笔记(3)
查看>>
软件过程的守护神
查看>>
NAT配置
查看>>
【翻译】Brewer's CAP Theorem CAP定理
查看>>
undefined与null
查看>>
redis总结
查看>>
解决SQL Server 阻止了对组件 'Ad Hoc Distributed Queries' 的 STATEMENT 'OpenRowset/OpenDatasource' 的访问...
查看>>
STM32F10x_RTC秒中断
查看>>
[原创]网站HTML,XHTML,XML,WML,CSS等测试验证工具介绍
查看>>
4-28
查看>>
display:none和visiblity:hidden区别
查看>>
C#double转化成字符串 保留小数位数, 不以科学计数法的形式出现。
查看>>
SpringMVC学习总结(三)——Controller接口详解(1)
查看>>
RGB色彩空间和HSV色彩空间的理解
查看>>
牛的障碍Cow Steeplechase
查看>>