ZooKeeper配额
ZooKeeper可以在znode上设置配额限制。如果超出了配置限制,ZooKeeper将会在log日志中打印WARN日志。如果超出配额限制,并不会停止行为操作。
ZooKeeper的配额是存储在/zookeeper/quota路径下的。可以通过ZooKeeper client APIs或者ZooKeeper Java Shell来进行set,list,delete配额。
下面举一个例子说明:
[zk: localhost:(CONNECTED) ] setquota -n /yandufeng_quota
Comment: the parts are option -n val path /yandufeng_quota
[zk: localhost:(CONNECTED) ]
[zk: localhost:(CONNECTED) ]
[zk: localhost:(CONNECTED) ] listquota /yandufeng_ yandufeng_quota yandufeng_test
[zk: localhost:(CONNECTED) ] listquota /yandufeng_quota
absolute path is /zookeeper/quota/yandufeng_quota/zookeeper_limits
Output quota for /yandufeng_quota count=,bytes=-
Output stat for /yandufeng_quota count=,bytes=
[zk: localhost:(CONNECTED) ]
[zk: localhost:(CONNECTED) ]
[zk: localhost:(CONNECTED) ]
[zk: localhost:(CONNECTED) ]
[zk: localhost:(CONNECTED) ]
[zk: localhost:(CONNECTED) ] create /yandufeng_ yandufeng_quota yandufeng_test
[zk: localhost:(CONNECTED) ] create /yandufeng_quota/child1 ""
Created /yandufeng_quota/child1
[zk: localhost:(CONNECTED) ] create /yandufeng_ yandufeng_quota yandufeng_test
[zk: localhost:(CONNECTED) ] create /yandufeng_quota/child2 ""
Created /yandufeng_quota/child2
[zk: localhost:(CONNECTED) ] create /yandufeng_ yandufeng_quota yandufeng_test
[zk: localhost:(CONNECTED) ] create /yandufeng_quota/child child2 child1
[zk: localhost:(CONNECTED) ] create /yandufeng_quota/child3 ""
Created /yandufeng_quota/child3
当你创建/yandufeng_quota/child3时,会在ZooKeeper的log日志中打印
-- ::, - WARN [CommitProcessor::DataTree@] - Quota exceeded: /yandufeng_quota count= limit=
你也可以执行
[zk: localhost:2181(CONNECTED) 18] delquota /yandufeng_quota
来删除这个配额
ZooKeeper配额的更多相关文章
- 12. ZooKeeper配额和认证
ZooKeeper具有与其数据模型相关的可配置配额(quota). 可以设置znode上的配额限制和存储的数据量.如果ZooKeeper命名空间中的一个子树超出与其关联的配额,ZooKeeper会在日 ...
- ZooKeeper配额指南(十)
配额 ZK有命名空间和字节配额.你可以使用ZooKeeperMain类来设置配额.ZK打印警告信息如果用户超过分配给他们的配额.这些信息被打印到ZK的日志中. $java -cp zookeeper. ...
- ZooKeeper文档(二)
ZooKeeper:因为协调的分布式系统是一个动物园 ZooKeeper对分布式应用来说是一个高性能的协调服务.它暴露通常的服务-比如命名,配置管理,同步,和组服务-用一种简单的接口,所以你不用从头开 ...
- ZooKeeper客户端 zkCli.sh 节点的配额设置
首先使用 zkCli.sh 连接上ZooKeeper服务器 配额设置命令格式如下: setquota -n|-b val path -n:val设置子节点个数 -b:val设置节点的数据长度 如果我们 ...
- ZooKeeper学习第一期---Zookeeper简单介绍
一.分布式协调技术 在给大家介绍ZooKeeper之前先来给大家介绍一种技术——分布式协调技术.那么什么是分布式协调技术?那么我来告诉大家,其实分布式协调技术主要用来解决分布式环境当中多个进程之间的同 ...
- kafka配额控制
转载请注明地址http://www.cnblogs.com/dongxiao-yang/p/5217754.html Starting in 0.9, the Kafka cluster has th ...
- Dubbo(二) 认识Zookeeper
前言 在昨天,我们给大家基本介绍了Dubbo,文中反复提到了Zookeeper,那么它到底是什么呢,这篇文章我们将从Dubbo层面去了解Zookeeper,不做全面讲解,毕竟这是Dubbo教程啊~ Z ...
- zookeeper基本讲解及基本命令和配置 (转)
一.ZooKeeper概述 ZooKeeper是一种为分布式应用所设计的高可用.高性能且一致的开源协调服务,是Google的Chubby一个开源实现,是Hadoop和Hbase的重要组件,它提供了一项 ...
- ZooKeeper之(二)数据模型
ZooKeeper 会维护一个具有层次关系的数据结构,它非常类似于一个标准的文件系统: 树形结构的每个节点都被称作为Znode. Zonde通过路径引用,如同Unix中的文件路径.路径必须是绝对的,因 ...
随机推荐
- jQuery EasyUI学习资源汇总
jQuery EasyUI学习资源汇总 EasyUi – 1.入门 EasyUi – 2.布局Layout + 3.登录界面 EasyUi – 4.datwagrid 学习Jquery EasyUI的 ...
- java 正则匹配int型
private static Pattern DIGIT_PATTERN = Pattern.compile("=\\d++"); Matcher goodsTypeMatcher ...
- IOS开发-UI学习-UIFont,字体设置及批量创建控件
在IOS 中,使用[UIFont familyNames]这个方法获取72种系统字体. 使用[UIFont fontWithName:@"Zapfino" size:18]这个方法 ...
- FB面经 Prepare: All Palindromic Substrings
Given a string, calculate how many substring is palindrome. Ignore non-char characters. Ignore case; ...
- 笔记整理--玩转robots协议
玩转robots协议 -- 其他 -- IT技术博客大学习 -- 共学习 共进步! - Google Chrome (2013/7/14 20:24:07) 玩转robots协议 2013年2月8日北 ...
- C#代码生成工具:文本模板初体验 使用T4批量修改实体框架(Entity Framework)的类名
转自:http://www.cnblogs.com/huangcong/archive/2011/07/20/1931107.html 在之前的文本模板(T4)初体验中我们已经知道了T4的用处,下面就 ...
- angularjs---服务(service / factory / provider)
初angularJs时 常写一些不够优雅的代码 !我总结了一下看看各位有没有中枪的!-----( 这里只针对服务service及其相关! ) 以下做法不太优雅 兄弟controller 之间的相同 ...
- Angular - - angular.identity和angular.noop
angular.identity 函数返回本身的第一个参数.这个函数一般用于函数风格. 格式:angular.identity() 使用代码: (function () { angular.modul ...
- xshell安装运行时提示缺少mfc110.dll
下载最新的mfc110.dll文件 https://pan.baidu.com/share/link?shareid=1932421734&uk=1784696518&app=zd 之 ...
- thinkphp 3.2 导入第三方类库的两种方式
第一种