abc_begin

导航

2018年1月5日 #

zookeeper伪分布式安装

摘要: 本文介绍zookeeper伪分布式安装。 所谓 “伪分布式集群” 就是在1台PC中启动多个zookeeper的实例。“完全分布式集群” 是每1台PC启动1个ZooKeeper实例。 由于我的测试环境PC数量有限,所以在1台PC中启动3个zookeeper的实例。下面以3个节点为例,介绍安装的过程 新 阅读全文

posted @ 2018-01-05 21:22 LastBattle 阅读(2261) 评论(0) 推荐(0) 编辑

zookeeper单节点安装

摘要: 本文介绍zookeeper单节点安装。 下载 http://archive.apache.org/dist/zookeeper/zookeeper-3.4.6/ 解压后,把conf中的zoo_sample.cfg复制一份成为zoo.cfg,修改一下里面的路径: 启动zookeeper [work@x 阅读全文

posted @ 2018-01-05 20:52 LastBattle 阅读(6945) 评论(0) 推荐(0) 编辑

491. Palindrome Number【easy】

摘要: Check a positive number is a palindrome or not. A palindrome number is that if you reverse the whole number you will get exactly the same number. Noti 阅读全文

posted @ 2018-01-05 14:59 LastBattle 阅读(204) 评论(0) 推荐(0) 编辑

hash slot(虚拟桶)

摘要: 在分布式集群中,如何保证相同请求落到相同的机器上,并且后面的集群机器可以尽可能的均分请求,并且当扩容或down机的情况下能对原有集群影响最小。 round robin算法:是把数据mod后直接映射到真实节点上面,这造成节点个数和数据的紧密关联、后期缺乏灵活扩展。 一致性哈希算法:多增加一层虚拟映射层 阅读全文

posted @ 2018-01-05 11:53 LastBattle 阅读(10926) 评论(5) 推荐(0) 编辑