ZooKeeper
破小孩儿
互联网
系统分析师和软件架构师
设计模式 SOA 分布式
展开
-
[ZooKeeper]znode的stat数据结构
Note: When a client performs an update (setACL, setData) or a delete (delete), it must supply the version of the data of the znode it is changing.原创 2016-05-27 09:23:44 · 1397 阅读 · 0 评论 -
[ZooKeeper]Barriers机制活动图
原创 2016-06-06 16:41:56 · 364 阅读 · 0 评论 -
[ZooKeeper]常见的KeeperException
常见的KeeperException里,Connectionloss异常通常是可以忽略的,authfailed和session expired异常要求重新创建zookeeper客户端。其他种类的异常,根据实际业务逻辑来处理。ZooKeeper.create NodeExistsException NODEEXISTS - if a node with the same actual pat原创 2016-06-11 15:23:16 · 10318 阅读 · 0 评论 -
[ZooKeeper]Leader Election机制活动图
原创 2016-06-08 17:00:09 · 617 阅读 · 0 评论 -
[ZooKeeper]Two-phased Commit机制活动图
原创 2016-06-08 10:49:32 · 798 阅读 · 0 评论 -
[ZooKeeper]纠正官网的Queue示例
单机版的队列用BlockingDeque或BlockingQueue就能实现import java.util.concurrent.BlockingDeque;import java.util.concurrent.LinkedBlockingDeque;/** * 单机版的队列 * */public class StandaloneQueue { private Block原创 2016-06-02 17:33:44 · 398 阅读 · 0 评论 -
[ZooKeeper]Locks机制活动图
原创 2016-06-07 16:39:33 · 281 阅读 · 0 评论 -
[ZooKeeper]纠正官网的Barrier的示例
Barrier接口public interface Barrier { void enter() throws InterruptedException; void leave() throws InterruptedException;}单机版的Barrier两个CountDownLatch就可以实现/** * 单机模式的Barrier */public c原创 2016-06-01 18:39:37 · 769 阅读 · 0 评论 -
[ZooKeeper]一个简单的Java示例(synchronous version)
package felix.zookeeper.examples.simple;import java.io.FileOutputStream;import java.io.IOException;import java.io.InputStream;import java.io.OutputStream;import org.apache.zookeeper.KeeperExcept原创 2016-05-31 18:18:30 · 648 阅读 · 0 评论 -
[ZooKeeper]ZooKeeper里提供认证功能的插件
原创 2016-05-30 21:20:22 · 1205 阅读 · 0 评论 -
[ZooKeeper]ZooKeeper Java客户端ACL API
The following constants are provided by the ZooKeeper C library:ZooDefs.Perms.READ; //can read node’s value and list its childrenZooDefs.Perms.WRITE;// can set the node’s valueZooDefs.Perms.CREATE;原创 2016-05-29 22:19:09 · 1737 阅读 · 0 评论 -
[ZooKeeper]ZooKeeper里的枚举和常量
znode的创建模式ZooKeeper会话状态原创 2016-05-27 14:17:14 · 558 阅读 · 0 评论 -
[ZooKeeper]ZooKeeper.multi的Op和OpResult
原创 2016-05-29 21:31:16 · 1555 阅读 · 0 评论 -
[ZooKeeper]ZooKeeper的Watch事件类型
ZooKeeper的Watch事件类型session eventsWatcher.Event.EventType.None Trigger Event Type AUTH_FAILED event Watcher.Event.KeeperState.AuthFailed CONNECTED event Watcher.Event.KeeperState.ConnectedRea原创 2016-05-28 16:52:04 · 4453 阅读 · 2 评论 -
[ZooKeeper]ZooKeeper的会话状态
原创 2016-05-28 13:49:09 · 631 阅读 · 0 评论 -
[ZooKeeper]Queues机制活动图
原创 2016-06-07 09:38:21 · 372 阅读 · 0 评论