public AllocationConfiguration(Configuration conf) { minQueueResources = new HashMap<String, Resource>(); maxQueueResources = new HashMap<String, Resource>(); queueWeights = new HashMap<String, ResourceWeights>(); queueMaxApps = new HashMap<String, Integer>(); userMaxApps = new HashMap<String, Integer>(); queueMaxAMShares = new HashMap<String, Float>(); userMaxAppsDefault = Integer.MAX_VALUE; queueMaxAppsDefault = Integer.MAX_VALUE; queueMaxAMShareDefault = 0.5f; queueAcls = new HashMap<String, Map<QueueACL, AccessControlList>>(); minSharePreemptionTimeouts = new HashMap<String, Long>(); fairSharePreemptionTimeouts = new HashMap<String, Long>(); fairSharePreemptionThresholds = new HashMap<String, Float>(); schedulingPolicies = new HashMap<String, SchedulingPolicy>(); defaultSchedulingPolicy = SchedulingPolicy.DEFAULT_POLICY; reservableQueues = new HashSet<>(); configuredQueues = new HashMap<FSQueueType, Set<String>>(); for (FSQueueType queueType : FSQueueType.values()) { configuredQueues.put(queueType, new HashSet<String>()); } placementPolicy = QueuePlacementPolicy.fromConfiguration(conf, configuredQueues); }
public AllocationConfiguration(Configuration conf) { minQueueResources = new HashMap<String, Resource>(); maxQueueResources = new HashMap<String, Resource>(); queueWeights = new HashMap<String, ResourceWeights>(); queueMaxApps = new HashMap<String, Integer>(); userMaxApps = new HashMap<String, Integer>(); queueMaxAMShares = new HashMap<String, Float>(); userMaxAppsDefault = Integer.MAX_VALUE; queueMaxAppsDefault = Integer.MAX_VALUE; queueMaxAMShareDefault = 0.5f; queueAcls = new HashMap<String, Map<QueueACL, AccessControlList>>(); minSharePreemptionTimeouts = new HashMap<String, Long>(); fairSharePreemptionTimeouts = new HashMap<String, Long>(); fairSharePreemptionThresholds = new HashMap<String, Float>(); schedulingPolicies = new HashMap<String, SchedulingPolicy>(); defaultSchedulingPolicy = SchedulingPolicy.DEFAULT_POLICY; reservableQueues = new HashSet<>(); configuredQueues = new HashMap<FSQueueType, Set<String>>(); for (FSQueueType queueType : FSQueueType.values()) { configuredQueues.put(queueType, new HashSet<String>()); } placementPolicy = QueuePlacementPolicy.fromConfiguration(conf, configuredQueues); }
public AllocationConfiguration(Configuration conf) { minQueueResources = new HashMap<>(); maxChildQueueResources = new HashMap<>(); maxQueueResources = new HashMap<>(); queueWeights = new HashMap<>(); queueMaxApps = new HashMap<>(); userMaxApps = new HashMap<>(); queueMaxAMShares = new HashMap<>(); userMaxAppsDefault = Integer.MAX_VALUE; queueMaxAppsDefault = Integer.MAX_VALUE; queueMaxResourcesDefault = new ConfigurableResource(Resources.unbounded()); queueMaxAMShareDefault = 0.5f; queueAcls = new HashMap<>(); resAcls = new HashMap<>(); minSharePreemptionTimeouts = new HashMap<>(); fairSharePreemptionTimeouts = new HashMap<>(); fairSharePreemptionThresholds = new HashMap<>(); schedulingPolicies = new HashMap<>(); defaultSchedulingPolicy = SchedulingPolicy.DEFAULT_POLICY; reservableQueues = new HashSet<>(); configuredQueues = new HashMap<>(); for (FSQueueType queueType : FSQueueType.values()) { configuredQueues.put(queueType, new HashSet<>()); } placementPolicy = QueuePlacementPolicy.fromConfiguration(conf, configuredQueues); nonPreemptableQueues = new HashSet<>(); queueMaxContainerAllocationMap = new HashMap<>(); }
private QueuePlacementPolicy getQueuePlacementPolicy( AllocationFileParser allocationFileParser, QueueProperties queueProperties, Configuration conf) throws AllocationConfigurationException { if (allocationFileParser.getQueuePlacementPolicy().isPresent()) { return QueuePlacementPolicy.fromXml( allocationFileParser.getQueuePlacementPolicy().get(), queueProperties.getConfiguredQueues(), conf); } else { return QueuePlacementPolicy.fromConfiguration(conf, queueProperties.getConfiguredQueues()); } }
configuredQueues, conf); } else { newPlacementPolicy = QueuePlacementPolicy.fromConfiguration(conf, configuredQueues);
configuredQueues, conf); } else { newPlacementPolicy = QueuePlacementPolicy.fromConfiguration(conf, configuredQueues);