惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Blog — PlanetScale
Blog — PlanetScale
小众软件
小众软件
F
Fortinet All Blogs
博客园 - 叶小钗
博客园_首页
D
DataBreaches.Net
Apple Machine Learning Research
Apple Machine Learning Research
U
Unit 42
爱范儿
爱范儿
aimingoo的专栏
aimingoo的专栏
博客园 - Franky
Martin Fowler
Martin Fowler
酷 壳 – CoolShell
酷 壳 – CoolShell
The Cloudflare Blog
A
About on SuperTechFans
Google DeepMind News
Google DeepMind News
Microsoft Security Blog
Microsoft Security Blog
IT之家
IT之家
M
MIT News - Artificial intelligence
有赞技术团队
有赞技术团队
博客园 - 【当耐特】
S
SegmentFault 最新的问题
Hugging Face - Blog
Hugging Face - Blog

博客园 - sinxsoft

loss.py:result type Float can't be cast to the desired output type long int AttributeError: module 'numpy' has no attribute 'int'. 非root账号,要写入特定文件夹的处理措施 Docker 运行你的Springboot应用。 阿里巴巴中间件团队出品的开源软件以及商业云服务(转) storm 配置,呵呵。 dubbo+zookeeper集群配置 tomcat8和7关于自定义tag的处理区别 每个程序员都必读的10篇文章 Java 之ThreadLocal 对应C#之ThreadStatic eclipse 引用项目(转) 债券发行价格招标和收益率招标:需要搞定 IIS之应用程序池-Web园-最大工作进程>1时系统出现问题 研究jBPM和NetBPM 研究:Microsoft Solution Framework SCRUM迭代增量式软件开发过程研究 多说多做多想。 架构师培训笔记: 从今天开始,向注册会计师进军。
zookeeper分布式部署-mac先测试
sinxsoft · 2015-11-21 · via 博客园 - sinxsoft

    由于平台马上要引入zookeeper+dubbo,为了解决zookeeper单个实例运行的风险,需要做个集群。

1,先说配置:zoo.cfg十分简单,分两种情况:

一种是在一台机器采用不同的端口配置多个服务;另一种是在多台机器上每个配一个服务,这样的安全系数会大很多。

单机版:

# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
dataDir=/Users/xxxxxx/zookeeper/zookeeper-3.3.6/server1/data
#不同节点不同端口:2081,2182,2183
clientPort=2181
server.1=localhost:2888:3888
server.2=localhost:2889:3889
server.3=localhost:2890:3890

多机版:

clientPort=2181
server.1=10.2.38.5:2888:3888
server.2=10.2.38.6:2888:3888
server.3=10.2.38.7:2888:3888

2,在各自data下面写入myid文件,内容为节点的序号,如1:

echo '1' > myid

3,依次启动服务即可:

sh zkServer.sh start