private void initGroupService(Configuration conf) { if (groupService == null) { groupService = Groups.getUserToGroupsMappingService(conf); } }
/** * Get the groups being used to map user-to-groups. * @return the groups being used to map user-to-groups. */ public static Groups getUserToGroupsMappingService() { return getUserToGroupsMappingService(new Configuration()); }
groups = Groups.getUserToGroupsMappingService(conf);
groups = Groups.getUserToGroupsMappingService(conf);
Groups.getUserToGroupsMappingService(conf); MyGroupsProvider.clearMapping(); MyGroupsProvider.mapping.put("userA", Arrays.asList("groupA"));
conf.set(CommonConfigurationKeys.HADOOP_SECURITY_GROUP_MAPPING, MyGroupsProvider.class.getName()); Groups.getUserToGroupsMappingService(conf); MyGroupsProvider.clearMapping(); MyGroupsProvider.mapping.put("userA", Arrays.asList("groupA"));
@Override // RefreshAuthorizationPolicyProtocol public void refreshUserToGroupsMappings() throws IOException { LOG.info("Refreshing all user-to-groups mappings. Requested by user: " + getRemoteUser().getShortUserName()); Groups.getUserToGroupsMappingService().refresh(); namesystem.logAuditEvent(true, "refreshUserToGroupsMappings", null); }
/** * Get the groups being used to map user-to-groups. * @return the groups being used to map user-to-groups. */ public static Groups getUserToGroupsMappingService() { return getUserToGroupsMappingService(new Configuration()); }
/** * Get the groups being used to map user-to-groups. * @return the groups being used to map user-to-groups. */ public static Groups getUserToGroupsMappingService() { return getUserToGroupsMappingService(new Configuration()); }
/** * Get the groups being used to map user-to-groups. * @return the groups being used to map user-to-groups. */ public static Groups getUserToGroupsMappingService() { return getUserToGroupsMappingService(new Configuration()); }
/** * Get the groups being used to map user-to-groups. * @return the groups being used to map user-to-groups. */ public static Groups getUserToGroupsMappingService() { return getUserToGroupsMappingService(new Configuration()); }
private static Groups getGroups(Configuration conf) { if (conf.getBoolean(USE_NEW_GROUPS, false)) { return new Groups(conf); } else { return Groups.getUserToGroupsMappingService(conf); } } }
@Override // RefreshAuthorizationPolicyProtocol public void refreshUserToGroupsMappings() throws IOException { LOG.info("Refreshing all user-to-groups mappings. Requested by user: " + getRemoteUser().getShortUserName()); Groups.getUserToGroupsMappingService().refresh(); }
private void refreshUserToGroupsMappings() throws IOException, YarnException { Groups.getUserToGroupsMappingService( getConfiguration(new Configuration(false), YarnConfiguration.CORE_SITE_CONFIGURATION_FILE)).refresh(); }
private void refreshUserToGroupsMappings() throws IOException, YarnException { Groups.getUserToGroupsMappingService( getConfiguration(new Configuration(false), YarnConfiguration.CORE_SITE_CONFIGURATION_FILE)).refresh(); }
@Override public void refreshUserToGroupsMappings() throws IOException { UserGroupInformation user = checkAcls("refreshUserToGroupsMappings"); Groups.getUserToGroupsMappingService().refresh(); HSAuditLogger.logSuccess(user.getShortUserName(), "refreshUserToGroupsMappings", HISTORY_ADMIN_SERVER); }
@Override public void refreshUserToGroupsMappings() throws IOException { UserGroupInformation user = checkAcls("refreshUserToGroupsMappings"); Groups.getUserToGroupsMappingService().refresh(); HSAuditLogger.logSuccess(user.getShortUserName(), "refreshUserToGroupsMappings", HISTORY_ADMIN_SERVER); }
@Override public void refreshUserToGroupsMappings() throws IOException { UserGroupInformation user = checkAcls("refreshUserToGroupsMappings"); Groups.getUserToGroupsMappingService().refresh(); HSAuditLogger.logSuccess(user.getShortUserName(), "refreshUserToGroupsMappings", HISTORY_ADMIN_SERVER); }
@Before public void setUp() throws Exception { config = new Configuration(); config.setClass("hadoop.security.group.mapping", TestRefreshUserMappings.MockUnixGroupsMapping.class, GroupMappingServiceProvider.class); config.setLong("hadoop.security.groups.cache.secs", groupRefreshTimeoutSec); Groups.getUserToGroupsMappingService(config); FileSystem.setDefaultUri(config, "hdfs://localhost:" + "0"); cluster = new MiniDFSCluster.Builder(config).build(); cluster.waitActive(); }
@Before public void setUp() throws Exception { config = new Configuration(); config.setClass("hadoop.security.group.mapping", TestRefreshUserMappings.MockUnixGroupsMapping.class, GroupMappingServiceProvider.class); config.setLong("hadoop.security.groups.cache.secs", groupRefreshTimeoutSec); Groups.getUserToGroupsMappingService(config); FileSystem.setDefaultUri(config, "hdfs://localhost:" + "0"); cluster = new MiniDFSCluster.Builder(config).build(); cluster.waitActive(); }