`
DDT_123456
  • 浏览: 15506 次
社区版块
存档分类
最新评论

ZOOKEEPER ACL

 
阅读更多
zookeeper ACL digest

List<ACL> acls = new ArrayList<ACL>(1);   
String authentication_type = "digest"; 
String authentication = "mahadev:some"; 
for (ACL ids_acl : Ids.CREATOR_ALL_ACL) { 
    acls.add(ids_acl); 
} 
ZooKeeper zoo = new ZooKeeper("1.1.1.1", 3000, null); 
zoo.addAuthInfo(authentication_type, authentication.getBytes()); 
zoo.create("/some", new byte[0], acls, CreateMode.PERSISTENT); 



分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics