本文整理了Java中org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.AllocationConfiguration.getMaxChildResources()
方法的一些代码示例,展示了AllocationConfiguration.getMaxChildResources()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AllocationConfiguration.getMaxChildResources()
方法的具体详情如下:
包路径:org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.AllocationConfiguration
类名称:AllocationConfiguration
方法名:getMaxChildResources
[英]Get the maximum resource allocation for children of the given queue.
[中]获取给定队列子级的最大资源分配。
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager
/**
* 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());
}
}
代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager
queueConf.getMaxChildResources("root.queueA"));
assertNull("Max child resources unexpectedly set for queue root.queueB",
queueConf.getMaxChildResources("root.queueB"));
assertNull("Max child resources unexpectedly set for queue root.queueC",
queueConf.getMaxChildResources("root.queueC"));
assertNull("Max child resources unexpectedly set for queue root.queueD",
queueConf.getMaxChildResources("root.queueD"));
assertNull("Max child resources unexpectedly set for queue root.queueE",
queueConf.getMaxChildResources("root.queueE"));
assertEquals(Resources.createResource(2048, 64),
queueConf.getMaxChildResources("root.queueF").getResource());
assertEquals(Resources.createResource(2048, 64),
queueConf.getMaxChildResources("root.queueG").getResource());
assertNull("Max child resources unexpectedly set for "
+ "queue root.queueG.queueH",
queueConf.getMaxChildResources("root.queueG.queueH"));
内容来源于网络,如有侵权,请联系作者删除!