关于ZK的前期技术储备

thrift本身不是问题,然后问题就是zookeeper

=========================================================================================================

1) 创建的代码如下:

CuratorFrameworkFactory.Builder builder = CuratorFrameworkFactory.builder();

if (StringUtils.isNotEmpty(auth)) {

builder.authorization("digest", auth.getBytes());

}

return builder.connectString(connectString)    .sessionTimeoutMs(sessionTimeout)    .connectionTimeoutMs(sessionTimeout)    .namespace(namespace)  

.retryPolicy(new ExponentialBackoffRetry(1000, retry))

.defaultData(null)

.build();

=========================================================================================================

2)掉线自动注册

http://www.tuicool.com/articles/m26bua

http://www.codelast.com/原创-zookeeper注册节点的掉线自动重新注册及测试方法/

http://www.cnblogs.com/scott19820130/p/4940274.html

http://www.codelast.com/原创-zookeeper注册节点的掉线自动重新注册及测试方法/

http://www.cnblogs.com/scott19820130/p/4940274.html

https://github.com/knightliao

http://www.cnblogs.com/mumuxinfei/p/3876190.html

http://blog.csdn.net/zhu_tianwei/article/details/44115667/

http://blog.chinaunix.net/uid-7374279-id-4062901.html

http://www.cnblogs.com/sharpxiajun/p/3496639.html

http://www.udpwork.com/item/14005.html

http://www.cnblogs.com/sharpxiajun/p/3500785.html

http://www.oschina.net/question/2680454_2169919

 

 

 

 

 

你可能感兴趣的:(thrift,zookeeper)