gpt4 book ai didi

org.apache.hadoop.yarn.client.api.YarnClient.getAllQueues()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-17 19:08:40 26 4
gpt4 key购买 nike

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

YarnClient.getAllQueues介绍

[英]Get information ( QueueInfo) about all queues, recursively if there is a hierarchy
[中]如果存在层次结构,则递归获取有关所有队列的信息(QueueInfo)

代码示例

代码示例来源:origin: apache/flink

private void checkYarnQueues(YarnClient yarnClient) {
  try {
    List<QueueInfo> queues = yarnClient.getAllQueues();
    if (queues.size() > 0 && this.yarnQueue != null) { // check only if there are queues configured in yarn and for this session.
      boolean queueFound = false;
      for (QueueInfo queue : queues) {
        if (queue.getQueueName().equals(this.yarnQueue)) {
          queueFound = true;
          break;
        }
      }
      if (!queueFound) {
        String queueNames = "";
        for (QueueInfo queue : queues) {
          queueNames += queue.getQueueName() + ", ";
        }
        LOG.warn("The specified queue '" + this.yarnQueue + "' does not exist. " +
          "Available queues: " + queueNames);
      }
    } else {
      LOG.debug("The YARN cluster does not have any queues configured");
    }
  } catch (Throwable e) {
    LOG.warn("Error while getting queue information from YARN: " + e.getMessage());
    if (LOG.isDebugEnabled()) {
      LOG.debug("Error details", e);
    }
  }
}

代码示例来源:origin: apache/flink

List<QueueInfo> qInfo = yarnClient.getAllQueues();
for (QueueInfo q : qInfo) {
  ps.println("Queue: " + q.getQueueName() + ", Current Capacity: " + q.getCurrentCapacity() + " Max Capacity: " +

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

@Override
public List<org.apache.hadoop.yarn.api.records.QueueInfo> getAllQueues()
  throws YarnException, IOException {
 return client.getAllQueues();
}

代码示例来源:origin: com.github.jiayuhan-it/hadoop-mapreduce-client-jobclient

@Override
public List<org.apache.hadoop.yarn.api.records.QueueInfo> getAllQueues()
  throws YarnException, IOException {
 return client.getAllQueues();
}

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

public QueueInfo[] getQueues() throws IOException, InterruptedException {
 try {
  return TypeConverter.fromYarnQueueInfo(client.getAllQueues(), this.conf);
 } catch (YarnException e) {
  throw new IOException(e);
 }
}

代码示例来源:origin: com.github.jiayuhan-it/hadoop-mapreduce-client-jobclient

public QueueInfo[] getQueues() throws IOException, InterruptedException {
 try {
  return TypeConverter.fromYarnQueueInfo(client.getAllQueues(), this.conf);
 } catch (YarnException e) {
  throw new IOException(e);
 }
}

代码示例来源:origin: org.apache.tez/tez-mapreduce

public QueueInfo[] getQueues() throws IOException, InterruptedException {
 try {
  return TypeConverter.fromYarnQueueInfo(client.getAllQueues(), this.conf);
 } catch (YarnException e) {
  throw new IOException(e);
 }
}

代码示例来源:origin: org.apache.flink/flink-yarn_2.11

private void checkYarnQueues(YarnClient yarnClient) {
  try {
    List<QueueInfo> queues = yarnClient.getAllQueues();
    if (queues.size() > 0 && this.yarnQueue != null) { // check only if there are queues configured in yarn and for this session.
      boolean queueFound = false;
      for (QueueInfo queue : queues) {
        if (queue.getQueueName().equals(this.yarnQueue)) {
          queueFound = true;
          break;
        }
      }
      if (!queueFound) {
        String queueNames = "";
        for (QueueInfo queue : queues) {
          queueNames += queue.getQueueName() + ", ";
        }
        LOG.warn("The specified queue '" + this.yarnQueue + "' does not exist. " +
          "Available queues: " + queueNames);
      }
    } else {
      LOG.debug("The YARN cluster does not have any queues configured");
    }
  } catch (Throwable e) {
    LOG.warn("Error while getting queue information from YARN: " + e.getMessage());
    if (LOG.isDebugEnabled()) {
      LOG.debug("Error details", e);
    }
  }
}

代码示例来源:origin: org.apache.flink/flink-yarn

private void checkYarnQueues(YarnClient yarnClient) {
  try {
    List<QueueInfo> queues = yarnClient.getAllQueues();
    if (queues.size() > 0 && this.yarnQueue != null) { // check only if there are queues configured in yarn and for this session.
      boolean queueFound = false;
      for (QueueInfo queue : queues) {
        if (queue.getQueueName().equals(this.yarnQueue)) {
          queueFound = true;
          break;
        }
      }
      if (!queueFound) {
        String queueNames = "";
        for (QueueInfo queue : queues) {
          queueNames += queue.getQueueName() + ", ";
        }
        LOG.warn("The specified queue '" + this.yarnQueue + "' does not exist. " +
          "Available queues: " + queueNames);
      }
    } else {
      LOG.debug("The YARN cluster does not have any queues configured");
    }
  } catch (Throwable e) {
    LOG.warn("Error while getting queue information from YARN: " + e.getMessage());
    if (LOG.isDebugEnabled()) {
      LOG.debug("Error details", e);
    }
  }
}

代码示例来源:origin: stackoverflow.com

YarnConfiguration yarnConfig = new YarnConfiguration();
YarnClient client = YarnClient.createYarnClient();
client.init(yarnConfig);
client.start();

client.getAllQueues(); //no longer throws NullPointer

代码示例来源:origin: org.apache.flink/flink-yarn_2.11

List<QueueInfo> qInfo = yarnClient.getAllQueues();
for (QueueInfo q : qInfo) {
  ps.println("Queue: " + q.getQueueName() + ", Current Capacity: " + q.getCurrentCapacity() + " Max Capacity: " +

代码示例来源:origin: org.apache.flink/flink-yarn

List<QueueInfo> qInfo = yarnClient.getAllQueues();
for (QueueInfo q : qInfo) {
  ps.println("Queue: " + q.getQueueName() + ", Current Capacity: " + q.getCurrentCapacity() + " Max Capacity: " +

代码示例来源:origin: hopshadoop/hopsworks

List<QueueInfo> qInfo = yarnClient.getAllQueues();
for (QueueInfo q : qInfo) {
 ps.println("Queue: " + q.getQueueName() + ", Current Capacity: " + q.

代码示例来源:origin: hopshadoop/hopsworks

List<QueueInfo> queues = yarnClient.getAllQueues();

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com