本文整理了Java中org.apache.hadoop.mapred.QueueManager.getLeafQueueNames
方法的一些代码示例,展示了QueueManager.getLeafQueueNames
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QueueManager.getLeafQueueNames
方法的具体详情如下:
包路径:org.apache.hadoop.mapred.QueueManager
类名称:QueueManager
方法名:getLeafQueueNames
[英]Return the set of leaf level queues configured in the system to which jobs are submitted.
The number of queues configured should be dependent on the Scheduler configured. Note that some schedulers work with only one queue, whereas others can support multiple queues.
[中]返回作业提交到的系统中配置的叶级队列集。
配置的队列数量应取决于配置的计划程序。请注意,一些调度器只处理一个队列,而其他调度器可以支持多个队列。
代码示例来源:origin: org.apache.hadoop/hadoop-mapred-test
public void testMultipleQueues() {
JobConf conf = new JobConf();
conf.set(DeprecatedQueueConfigurationParser.MAPRED_QUEUE_NAMES_KEY,
"q1,q2,Q3");
QueueManager qMgr = new QueueManager(conf);
Set<String> expQueues = new TreeSet<String>();
expQueues.add("q1");
expQueues.add("q2");
expQueues.add("Q3");
verifyQueues(expQueues, qMgr.getLeafQueueNames());
}
代码示例来源:origin: org.apache.hadoop/hadoop-mapreduce-client-core
template.add("first");
template.add("second");
assertEquals(manager.getLeafQueueNames(), template);
代码示例来源:origin: org.apache.hadoop/hadoop-mapreduce-client-core
template.add("first");
template.add("second");
assertEquals(manager.getLeafQueueNames(), template);
代码示例来源:origin: org.apache.hadoop/hadoop-mapred
public org.apache.hadoop.mapreduce.JobStatus[] getJobsFromQueue(String queue)
throws IOException {
Collection<JobInProgress> jips = null;
if (queueManager.getLeafQueueNames().contains(queue)) {
jips = taskScheduler.getJobs(queue);
}
return getJobStatus(jips,false);
}
代码示例来源:origin: org.apache.hadoop/hadoop-mapred
/**
* For a JobInProgress that is being submitted, check whether
* queue that the job has been submitted to exists and is RUNNING.
* @param job The JobInProgress object being submitted.
* @throws IOException
*/
public void checkQueueValidity(JobInProgress job) throws IOException {
String queue = job.getProfile().getQueueName();
if (!(queueManager.getLeafQueueNames().contains(queue))) {
throw new IOException("Queue \"" + queue + "\" does not exist");
}
// check if queue is RUNNING
if (!queueManager.isRunning(queue)) {
throw new IOException("Queue \"" + queue + "\" is not running");
}
}
代码示例来源:origin: org.apache.hadoop/hadoop-mapred-test
/**
* Test to verify that the scheduling information per queue in the
* {@link QueueManager} is retained across queue-refresh.
*
* @throws Exception
*/
@Test
public void testSchedulingInfoAfterRefresh()
throws Exception {
JobQueueInfo[] queues = getSimpleQueueHierarchy();
// write the configuration file
writeQueueConfigurationFile(
QUEUES_CONFIG_FILE_PATH, new JobQueueInfo[] { queues[0] });
QueueManager qManager = new QueueManager();
// Set some scheduling information for the queues in the QueueManager.
for (String qName : qManager.getLeafQueueNames()) {
qManager.setSchedulerInfo(qName, new String(
"scheduling-information-for-queue-" + qName));
}
qManager.refreshQueues(null, null);
// Verify that the scheduling information is retained across refresh.
for (String qName : qManager.getLeafQueueNames()) {
assertEquals("scheduling-information-for-queue-" + qName,
qManager.getSchedulerInfo(qName));
}
}
代码示例来源:origin: org.apache.hadoop/hadoop-mapred-test
Set<String> leafNames = qm.getLeafQueueNames();
Queue p = qm.getQueue("p1");
Set<Queue> children = p.getChildren();
内容来源于网络,如有侵权,请联系作者删除!