@Override public RefreshUserToGroupsMappingsResponse refreshUserToGroupsMappings( RefreshUserToGroupsMappingsRequest request) throws YarnException, IOException { final String operation = "refreshUserToGroupsMappings"; UserGroupInformation user = checkAcls(operation); checkRMStatus(user.getShortUserName(), operation, "refresh user-groups."); refreshUserToGroupsMappings(); RMAuditLogger.logSuccess(user.getShortUserName(), operation, "AdminService"); return recordFactory.newRecordInstance( RefreshUserToGroupsMappingsResponse.class); }
@Override public RefreshUserToGroupsMappingsResponse refreshUserToGroupsMappings( RefreshUserToGroupsMappingsRequest request) throws YarnException, IOException { String argName = "refreshUserToGroupsMappings"; UserGroupInformation user = checkAcls(argName); checkRMStatus(user.getShortUserName(), argName, "refresh user-groups."); refreshUserToGroupsMappings(); RMAuditLogger.logSuccess(user.getShortUserName(), argName, "AdminService"); return recordFactory.newRecordInstance( RefreshUserToGroupsMappingsResponse.class); }
@VisibleForTesting void refreshAll() throws ServiceFailedException { try { checkAcls("refreshAll"); refreshQueues(); refreshNodes(); refreshSuperUserGroupsConfiguration(); refreshUserToGroupsMappings(); if (getConfig().getBoolean( CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHORIZATION, false)) { refreshServiceAcls(); } } catch (Exception ex) { throw new ServiceFailedException(ex.getMessage()); } }
private void refreshAll() throws ServiceFailedException { try { refreshQueues(RefreshQueuesRequest.newInstance()); refreshNodes(RefreshNodesRequest.newInstance()); refreshSuperUserGroupsConfiguration( RefreshSuperUserGroupsConfigurationRequest.newInstance()); refreshUserToGroupsMappings( RefreshUserToGroupsMappingsRequest.newInstance()); if (getConfig().getBoolean( CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHORIZATION, false)) { refreshServiceAcls(RefreshServiceAclsRequest.newInstance()); } } catch (Exception ex) { throw new ServiceFailedException(ex.getMessage()); } }
@VisibleForTesting void refreshAll() throws ServiceFailedException { try { checkAcls("refreshAll"); if (isSchedulerMutable()) { try { ((MutableConfScheduler) rm.getRMContext().getScheduler()) .getMutableConfProvider().reloadConfigurationFromStore(); } catch (Exception e) { throw new IOException("Failed to refresh configuration:", e); } } refreshQueues(); refreshNodes(); refreshSuperUserGroupsConfiguration(); refreshUserToGroupsMappings(); if (getConfig().getBoolean( CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHORIZATION, false)) { refreshServiceAcls(); } refreshClusterMaxPriority(); } catch (Exception ex) { throw new ServiceFailedException("RefreshAll operation failed", ex); } }
.refreshUserToGroupsMappings(RefreshUserToGroupsMappingsRequest .newInstance()); List<String> groupAfter =
@Test public void testRefreshUserToGroupsMappingsWithLocalConfigurationProvider() { rm = new MockRM(configuration); rm.init(configuration); rm.start(); try { rm.adminService .refreshUserToGroupsMappings(RefreshUserToGroupsMappingsRequest .newInstance()); } catch (Exception ex) { fail("Using localConfigurationProvider. Should not get any exception."); } }
.refreshUserToGroupsMappings(RefreshUserToGroupsMappingsRequest .newInstance()); List<String> groupAfter =
@Test public void testRefreshUserToGroupsMappingsWithLocalConfigurationProvider() { rm = new MockRM(configuration); rm.init(configuration); rm.start(); try { rm.adminService .refreshUserToGroupsMappings(RefreshUserToGroupsMappingsRequest .newInstance()); } catch (Exception ex) { fail("Using localConfigurationProvider. Should not get any exception."); } }