/** * Initialize a {@link FSQueue} with queue-specific properties and its * metrics. * @param queue the FSQueue needed to be initialized */ public void initFSQueue(FSQueue queue){ // Set queue-specific properties. String name = queue.getName(); queue.setWeights(getQueueWeight(name)); queue.setMinShare(getMinResources(name)); queue.setMaxShare(getMaxResources(name)); queue.setMaxRunningApps(getQueueMaxApps(name)); queue.setMaxAMShare(getQueueMaxAMShare(name)); queue.setMaxChildQueueResource(getMaxChildResources(name)); queue.setMaxContainerAllocation(getQueueMaxContainerAllocation(name)); // Set queue metrics. queue.getMetrics().setMinShare(queue.getMinShare()); queue.getMetrics().setMaxShare(queue.getMaxShare()); queue.getMetrics().setMaxApps(queue.getMaxRunningApps()); queue.getMetrics().setSchedulingPolicy(getSchedulingPolicy(name).getName()); } }
queueConf.getQueueMaxContainerAllocation( "root." + YarnConfiguration.DEFAULT_QUEUE_NAME)); assertEquals(Resources.unbounded(), queueConf.getQueueMaxContainerAllocation("root.queueA")); assertEquals(Resources.unbounded(), queueConf.getQueueMaxContainerAllocation("root.queueB")); assertEquals(Resources.unbounded(), queueConf.getQueueMaxContainerAllocation("root.queueC")); assertEquals(Resources.unbounded(), queueConf.getQueueMaxContainerAllocation("root.queueD")); assertEquals(Resources.unbounded(), queueConf.getQueueMaxContainerAllocation("root.queueE")); assertEquals(Resources.unbounded(), queueConf.getQueueMaxContainerAllocation("root.queueF")); assertEquals(expectedResourceWithCustomType, queueConf.getQueueMaxContainerAllocation("root.queueG")); assertEquals(Resources.createResource(1024, 8), queueConf.getQueueMaxContainerAllocation("root.queueG.queueH"));