List of usage examples for org.apache.hadoop.util ZKUtil removeSpecificPerms
public static int removeSpecificPerms(int perms, int remove)
From source file:com.cloudera.llama.am.LlamaHAFencer.java
License:Apache License
private List<ACL> createAclsForExclusiveReadAccess() throws LlamaException { List<ACL> acls = new ArrayList<ACL>(); for (ACL acl : conf.getZkAcls()) { acls.add(new ACL(ZKUtil.removeSpecificPerms(acl.getPerms(), ZooDefs.Perms.READ), acl.getId())); }// ww w . ja va 2 s . co m Id llamaId; try { llamaId = new Id(authScheme, DigestAuthenticationProvider.generateDigest(fencingUsername + ":" + fencingPassword)); } catch (NoSuchAlgorithmException e) { throw new LlamaException(ErrorCode.INTERNAL_ERROR, "Unable to create username:password digest for ZK"); } acls.add(new ACL(ZooDefs.Perms.READ, llamaId)); return acls; }