@Test public void testCustom() { Configuration conf = new Configuration(false); for (KMSACLs.Type type : KMSACLs.Type.values()) { conf.set(type.getConfigKey(), type.toString() + " "); } KMSACLs acls = new KMSACLs(conf); for (KMSACLs.Type type : KMSACLs.Type.values()) { Assert.assertTrue(acls.hasAccess(type, UserGroupInformation.createRemoteUser(type.toString()))); Assert.assertFalse(acls.hasAccess(type, UserGroupInformation.createRemoteUser("foo"))); } }
public boolean hasAccess(Type type, UserGroupInformation ugi) { return acls.get(type).isUserAllowed(ugi); }
KMSACLs implements Runnable { public boolean hasAccess(Type type, UserGroupInformation ugi) { return acls.get(type).isUserAllowed(ugi); } }
KMSACLs implements Runnable { public boolean hasAccess(Type type, UserGroupInformation ugi) { return acls.get(type).isUserAllowed(ugi); } KMSACLs(Configuration conf);  KMSACLs(); }
KMSACLs implements Runnable { public boolean hasAccess(Type type, UserGroupInformation ugi) { return acls.get(type).isUserAllowed(ugi); } KMSACLs(Configuration conf);  KMSACLs(); @Override void run(); synchronized void startReloader(); synchronized void stopReloader(); boolean hasAccess(Type type, UserGroupInformation ugi); }
KMSACLs implements Runnable { public boolean hasAccess(Type type, UserGroupInformation ugi) { return acls.get(type).isUserAllowed(ugi); } KMSACLs(Configuration conf);  KMSACLs(); @Override void run(); synchronized void startReloader(); synchronized void stopReloader(); boolean hasAccess(Type type, UserGroupInformation ugi); static final String ACL_DEFAULT; static final int RELOADER_SLEEP_MILLIS; }