etcd

启动集群

./etcd -name THadoop2 -initial-advertise-peer-urls http://ip:2380 \
  -listen-peer-urls http://ip:2380 \
  -listen-client-urls http://ip:2379,http://127.0.0.1:2379 \
  -advertise-client-urls http://ip:2379 \
  -initial-cluster-token my-etcd-cluster \
  -initial-cluster THadoop2=http://ip:2380,etcd1=http://ip:2380,etcd2=http://ip:2380 \
  -initial-cluster-state new
./etcd -name THadoop3 -initial-advertise-peer-urls http://ip:2380 \
  -listen-peer-urls http://ip:2380 \
  -listen-client-urls http://ip:2379,http://127.0.0.1:2379 \
  -advertise-client-urls http://ip:2379 \
  -initial-cluster-token my-etcd-cluster \
  -initial-cluster THadoop3=http://95:2380,etcd1=http://94:2380,etcd2=http://50:2380 \
  -initial-cluster-state new
./etcd -name THadoop8 -initial-advertise-peer-urls http://50:2380 \
  -listen-peer-urls http://50:2380 \
  -listen-client-urls http://50:2379,http://127.0.0.1:2379 \
  -advertise-client-urls http://50:2379 \
  -initial-cluster-token my-etcd-cluster \
  -initial-cluster THadoop8=http://50:2380,etcd1=http://94:2380,etcd2=http://95:2380 \
  -initial-cluster-state new

集群间通信:
./etcdctl set testkey “hello”
./etcdctl get testkey
curl -L http://10.185.28.50:2379/v2/keys/testkey

端口号可以自行指定,只要不冲突就行
参考:
http://soft.dog/2016/02/16/etcd-cluster/
http://www.infoq.com/cn/articles/etcd-interpretation-application-scenario-implement-principle
http://www.sel.zju.edu.cn/?p=523

etcdctl参数:
http://www.kancloud.cn/thinkphp/docker_practice/30966

github
https://github.com/cloudcube/coreos-manual-chinese/blob/master/distributed-configuration/getting-started-with-etcd/ZH_CN/README.md
https://github.com/coreos/etcd/tree/master/Documentation
http://www.csdn.net/article/2015-01-22/2823659

利用etcd搭建新的hadoop集群

https://medium.com/pachyderm-data/lets-build-a-modern-hadoop-4fc160f8d74f#.l68mzr10o

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值