private void refreshActiveServicesAcls() throws IOException, YarnException { PolicyProvider policyProvider = RMPolicyProvider.getInstance(); Configuration conf = getConfiguration(new Configuration(false), YarnConfiguration.HADOOP_POLICY_CONFIGURATION_FILE); rmContext.getClientRMService().refreshServiceAcls(conf, policyProvider); rmContext.getApplicationMasterService().refreshServiceAcls( conf, policyProvider); rmContext.getResourceTrackerService().refreshServiceAcls( conf, policyProvider); }
private RMApp createRMApp(Configuration conf) { ApplicationSubmissionContext submissionContext = ApplicationSubmissionContext .newInstance(appId, "test", "default", Priority.newInstance(0), mock(ContainerLaunchContext.class), false, true, 2, Resource.newInstance(10, 2), "test"); return new RMAppImpl(this.appId, this.rmContext, conf, "test", "test", "default", submissionContext, scheduler, this.rmContext.getApplicationMasterService(), System.currentTimeMillis(), "test", null, null); } }
@Override public RefreshServiceAclsResponse refreshServiceAcls( RefreshServiceAclsRequest request) throws YarnException, IOException { if (!getConfig().getBoolean( CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHORIZATION, false)) { throw RPCUtil.getRemoteException( new IOException("Service Authorization (" + CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHORIZATION + ") not enabled.")); } String argName = "refreshServiceAcls"; UserGroupInformation user = checkAcls(argName); checkRMStatus(user.getShortUserName(), argName, "refresh Service ACLs."); PolicyProvider policyProvider = RMPolicyProvider.getInstance(); Configuration conf = getConfiguration(new Configuration(false), YarnConfiguration.HADOOP_POLICY_CONFIGURATION_FILE); refreshServiceAcls(conf, policyProvider); rmContext.getClientRMService().refreshServiceAcls(conf, policyProvider); rmContext.getApplicationMasterService().refreshServiceAcls( conf, policyProvider); rmContext.getResourceTrackerService().refreshServiceAcls( conf, policyProvider); RMAuditLogger.logSuccess(user.getShortUserName(), argName, "AdminService"); return recordFactory.newRecordInstance(RefreshServiceAclsResponse.class); }
private void refreshActiveServicesAcls() throws IOException, YarnException { PolicyProvider policyProvider = RMPolicyProvider.getInstance(); Configuration conf = getConfiguration(new Configuration(false), YarnConfiguration.HADOOP_POLICY_CONFIGURATION_FILE); rm.getRMContext().getClientRMService().refreshServiceAcls(conf, policyProvider); rm.getRMContext().getApplicationMasterService().refreshServiceAcls( conf, policyProvider); rm.getRMContext().getResourceTrackerService().refreshServiceAcls( conf, policyProvider); }
getServiceAddress(rmContext.getClientRMService().getBindAddress()); String amRMAddress = getServiceAddress( rmContext.getApplicationMasterService().getBindAddress()); String rmAdminAddress = getServiceAddress( config.getSocketAddr(YarnConfiguration.RM_ADMIN_ADDRESS,
@Override protected void submitApplication( ApplicationSubmissionContext submissionContext, long submitTime, String user) throws YarnException { //Do nothing, just add the application to RMContext RMAppImpl application = new RMAppImpl(submissionContext.getApplicationId(), this.rmContext, this.conf, submissionContext.getApplicationName(), user, submissionContext.getQueue(), submissionContext, this.rmContext.getScheduler(), this.rmContext.getApplicationMasterService(), submitTime, submissionContext.getApplicationType(), submissionContext.getApplicationTags(), null); this.rmContext.getRMApps().put(submissionContext.getApplicationId(), application); //Do not send RMAppEventType.START event //so the state of Application will not reach to NEW_SAVING state. } }
@Override protected void submitApplication( ApplicationSubmissionContext submissionContext, long submitTime, String user) throws YarnException { //Do nothing, just add the application to RMContext RMAppImpl application = new RMAppImpl(submissionContext.getApplicationId(), this.rmContext, this.conf, submissionContext.getApplicationName(), user, submissionContext.getQueue(), submissionContext, this.rmContext.getScheduler(), this.rmContext.getApplicationMasterService(), submitTime, submissionContext.getApplicationType(), submissionContext.getApplicationTags(), null); this.rmContext.getRMApps().put(submissionContext.getApplicationId(), application); //Do not send RMAppEventType.START event //so the state of Application will not reach to NEW_SAVING state. } }
OpportunisticContainerAllocatorAMService appMaster = (OpportunisticContainerAllocatorAMService) rm.getRMContext() .getApplicationMasterService(); GenericTestUtils.waitFor(new Supplier<Boolean>() { @Override
resourceManager.getRMContext().getApplicationMasterService() .getServer().getServiceAuthorizationManager(); verifyServiceACLsRefresh(appMasterService,
resourceManager.getRMContext().getApplicationMasterService() .getServer().getServiceAuthorizationManager(); verifyServiceACLsRefresh(appMasterService,
resourceManager.getRMContext().getApplicationMasterService() .getServer().getServiceAuthorizationManager(); verifyServiceACLsRefresh(appMasterService,
resourceManager.getRMContext().getApplicationMasterService() .getServer().getServiceAuthorizationManager(); verifyServiceACLsRefresh(appMasterService,