protected void createPolicyMonitors() { if (scheduler instanceof PreemptableResourceScheduler && conf.getBoolean(YarnConfiguration.RM_SCHEDULER_ENABLE_MONITORS, YarnConfiguration.DEFAULT_RM_SCHEDULER_ENABLE_MONITORS)) { LOG.info("Loading policy monitors"); List<SchedulingEditPolicy> policies = conf.getInstances( YarnConfiguration.RM_SCHEDULER_MONITOR_POLICIES, SchedulingEditPolicy.class); if (policies.size() > 0) { for (SchedulingEditPolicy policy : policies) { LOG.info("LOADING SchedulingEditPolicy:" + policy.getPolicyName()); // periodically check whether we need to take action to guarantee // constraints SchedulingMonitor mon = new SchedulingMonitor(rmContext, policy); addService(mon); } } else { LOG.warn("Policy monitors configured (" + YarnConfiguration.RM_SCHEDULER_ENABLE_MONITORS + ") but none specified (" + YarnConfiguration.RM_SCHEDULER_MONITOR_POLICIES + ")"); } } } }
protected void createPolicyMonitors() { if (scheduler instanceof PreemptableResourceScheduler && conf.getBoolean(YarnConfiguration.RM_SCHEDULER_ENABLE_MONITORS, YarnConfiguration.DEFAULT_RM_SCHEDULER_ENABLE_MONITORS)) { LOG.info("Loading policy monitors"); List<SchedulingEditPolicy> policies = conf.getInstances( YarnConfiguration.RM_SCHEDULER_MONITOR_POLICIES, SchedulingEditPolicy.class); if (policies.size() > 0) { for (SchedulingEditPolicy policy : policies) { LOG.info("LOADING SchedulingEditPolicy:" + policy.getPolicyName()); // periodically check whether we need to take action to guarantee // constraints SchedulingMonitor mon = new SchedulingMonitor(rmContext, policy); addService(mon); } } else { LOG.warn("Policy monitors configured (" + YarnConfiguration.RM_SCHEDULER_ENABLE_MONITORS + ") but none specified (" + YarnConfiguration.RM_SCHEDULER_MONITOR_POLICIES + ")"); } } } }
private void createAndRegisterOpportunisticDispatcher( ApplicationMasterService service) { if (!isOpportunisticSchedulingEnabled(conf)) { return; } EventDispatcher oppContainerAllocEventDispatcher = new EventDispatcher( (OpportunisticContainerAllocatorAMService) service, OpportunisticContainerAllocatorAMService.class.getName()); // Add an event dispatcher for the // OpportunisticContainerAllocatorAMService to handle node // additions, updates and removals. Since the SchedulerEvent is currently // a super set of theses, we register interest for it. addService(oppContainerAllocEventDispatcher); rmDispatcher .register(SchedulerEventType.class, oppContainerAllocEventDispatcher); }
addService(rmSecretManagerService); addService(containerAllocationExpirer); rmContext.setContainerAllocationExpirer(containerAllocationExpirer); addService(amLivelinessMonitor); rmContext.setAMLivelinessMonitor(amLivelinessMonitor); addService(amFinishingMonitor); rmContext.setAMFinishingMonitor(amFinishingMonitor); addService(rmAppLifetimeMonitor); rmContext.setRMAppLifetimeMonitor(rmAppLifetimeMonitor); addService(nlm); rmContext.setNodeLabelManager(nlm); addService(nam); rmContext.setNodeAttributesManager(nam); addService(placementConstraintManager); rmContext.setPlacementConstraintManager(placementConstraintManager); createMultiNodeSortingManager(); multiNodeSortingManager.setRMContext(rmContext); addService(multiNodeSortingManager); rmContext.setMultiNodeSortingManager(multiNodeSortingManager); createRMDelegatedNodeLabelsUpdater();
addService(rmSecretManagerService); addService(containerAllocationExpirer); rmContext.setContainerAllocationExpirer(containerAllocationExpirer); addService(amLivelinessMonitor); rmContext.setAMLivelinessMonitor(amLivelinessMonitor); addService(amFinishingMonitor); rmContext.setAMFinishingMonitor(amFinishingMonitor); addService(nlm); rmContext.setNodeLabelManager(nlm); addService(nodesListManager); rmContext.setNodesListManager(nodesListManager); addService(nmLivelinessMonitor); addService(resourceTracker); rmContext.setResourceTrackerService(resourceTracker); addService(masterService) ; rmContext.setApplicationMasterService(masterService); addService(clientRM); rmContext.setClientRMService(clientRM); addService(applicationMasterLauncher);
addService(rmSecretManagerService); addService(containerAllocationExpirer); rmContext.setContainerAllocationExpirer(containerAllocationExpirer); addService(amLivelinessMonitor); rmContext.setAMLivelinessMonitor(amLivelinessMonitor); addService(amFinishingMonitor); rmContext.setAMFinishingMonitor(amFinishingMonitor); addService(nlm); rmContext.setNodeLabelManager(nlm); addService(nodesListManager); rmContext.setNodesListManager(nodesListManager); addService(nmLivelinessMonitor); addService(resourceTracker); rmContext.setResourceTrackerService(resourceTracker); addService(masterService) ; rmContext.setApplicationMasterService(masterService); addService(clientRM); rmContext.setClientRMService(clientRM); addService(applicationMasterLauncher);