org.apache.hadoop.mapred.QueueManager.isRunning()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(1.3k)|赞(0)|评价(0)|浏览(78)

本文整理了Java中org.apache.hadoop.mapred.QueueManager.isRunning方法的一些代码示例,展示了QueueManager.isRunning的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QueueManager.isRunning方法的具体详情如下:
包路径:org.apache.hadoop.mapred.QueueManager
类名称:QueueManager
方法名:isRunning

QueueManager.isRunning介绍

[英]Checks whether the given queue is running or not.
[中]检查给定队列是否正在运行。

代码示例

代码示例来源:origin: org.apache.hadoop/hadoop-mapreduce-client-core

assertTrue(manager.isRunning("first"));
assertFalse(manager.isRunning("second"));

代码示例来源: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

QueueACL.ADMINISTER_JOBS, ugi));
assertTrue(qm.isRunning("p1" + NAME_SEPARATOR + "p13"));

相关文章