Java 类org.apache.hadoop.mapreduce.QueueInfo 实例源码

项目:hadoop    文件:JobClient.java   
/**
 * Gets all the jobs which were added to particular Job Queue
 * 
 * @param queueName name of the Job Queue
 * @return Array of jobs present in the job queue
 * @throws IOException
 */

public JobStatus[] getJobsFromQueue(final String queueName) throws IOException {
  try {
    QueueInfo queue = clientUgi.doAs(new PrivilegedExceptionAction<QueueInfo>() {
      @Override
      public QueueInfo run() throws IOException, InterruptedException {
        return cluster.getQueue(queueName);
      }
    });
    if (queue == null) {
      return null;
    }
    org.apache.hadoop.mapreduce.JobStatus[] stats = 
      queue.getJobStatuses();
    JobStatus[] ret = new JobStatus[stats.length];
    for (int i = 0 ; i < stats.length; i++ ) {
      ret[i] = JobStatus.downgrade(stats[i]);
    }
    return ret;
  } catch (InterruptedException ie) {
    throw new IOException(ie);
  }
}
项目:hadoop    文件:JobClient.java   
/**
 * Gets the queue information associated to a particular Job Queue
 * 
 * @param queueName name of the job queue.
 * @return Queue information associated to particular queue.
 * @throws IOException
 */
public JobQueueInfo getQueueInfo(final String queueName) throws IOException {
  try {
    QueueInfo queueInfo = clientUgi.doAs(new 
        PrivilegedExceptionAction<QueueInfo>() {
      public QueueInfo run() throws IOException, InterruptedException {
        return cluster.getQueue(queueName);
      }
    });
    if (queueInfo != null) {
      return new JobQueueInfo(queueInfo);
    }
    return null;
  } catch (InterruptedException ie) {
    throw new IOException(ie);
  }
}
项目:aliyun-oss-hadoop-fs    文件:JobClient.java   
/**
 * Gets all the jobs which were added to particular Job Queue
 * 
 * @param queueName name of the Job Queue
 * @return Array of jobs present in the job queue
 * @throws IOException
 */

public JobStatus[] getJobsFromQueue(final String queueName) throws IOException {
  try {
    QueueInfo queue = clientUgi.doAs(new PrivilegedExceptionAction<QueueInfo>() {
      @Override
      public QueueInfo run() throws IOException, InterruptedException {
        return cluster.getQueue(queueName);
      }
    });
    if (queue == null) {
      return null;
    }
    org.apache.hadoop.mapreduce.JobStatus[] stats = 
      queue.getJobStatuses();
    JobStatus[] ret = new JobStatus[stats.length];
    for (int i = 0 ; i < stats.length; i++ ) {
      ret[i] = JobStatus.downgrade(stats[i]);
    }
    return ret;
  } catch (InterruptedException ie) {
    throw new IOException(ie);
  }
}
项目:aliyun-oss-hadoop-fs    文件:JobClient.java   
/**
 * Gets the queue information associated to a particular Job Queue
 * 
 * @param queueName name of the job queue.
 * @return Queue information associated to particular queue.
 * @throws IOException
 */
public JobQueueInfo getQueueInfo(final String queueName) throws IOException {
  try {
    QueueInfo queueInfo = clientUgi.doAs(new 
        PrivilegedExceptionAction<QueueInfo>() {
      public QueueInfo run() throws IOException, InterruptedException {
        return cluster.getQueue(queueName);
      }
    });
    if (queueInfo != null) {
      return new JobQueueInfo(queueInfo);
    }
    return null;
  } catch (InterruptedException ie) {
    throw new IOException(ie);
  }
}
项目:big-c    文件:JobClient.java   
/**
 * Gets all the jobs which were added to particular Job Queue
 * 
 * @param queueName name of the Job Queue
 * @return Array of jobs present in the job queue
 * @throws IOException
 */

public JobStatus[] getJobsFromQueue(final String queueName) throws IOException {
  try {
    QueueInfo queue = clientUgi.doAs(new PrivilegedExceptionAction<QueueInfo>() {
      @Override
      public QueueInfo run() throws IOException, InterruptedException {
        return cluster.getQueue(queueName);
      }
    });
    if (queue == null) {
      return null;
    }
    org.apache.hadoop.mapreduce.JobStatus[] stats = 
      queue.getJobStatuses();
    JobStatus[] ret = new JobStatus[stats.length];
    for (int i = 0 ; i < stats.length; i++ ) {
      ret[i] = JobStatus.downgrade(stats[i]);
    }
    return ret;
  } catch (InterruptedException ie) {
    throw new IOException(ie);
  }
}
项目:big-c    文件:JobClient.java   
/**
 * Gets the queue information associated to a particular Job Queue
 * 
 * @param queueName name of the job queue.
 * @return Queue information associated to particular queue.
 * @throws IOException
 */
public JobQueueInfo getQueueInfo(final String queueName) throws IOException {
  try {
    QueueInfo queueInfo = clientUgi.doAs(new 
        PrivilegedExceptionAction<QueueInfo>() {
      public QueueInfo run() throws IOException, InterruptedException {
        return cluster.getQueue(queueName);
      }
    });
    if (queueInfo != null) {
      return new JobQueueInfo(queueInfo);
    }
    return null;
  } catch (InterruptedException ie) {
    throw new IOException(ie);
  }
}
项目:hadoop-2.6.0-cdh5.4.3    文件:JobClient.java   
/**
 * Gets all the jobs which were added to particular Job Queue
 * 
 * @param queueName name of the Job Queue
 * @return Array of jobs present in the job queue
 * @throws IOException
 */

public JobStatus[] getJobsFromQueue(final String queueName) throws IOException {
  try {
    QueueInfo queue = clientUgi.doAs(new PrivilegedExceptionAction<QueueInfo>() {
      @Override
      public QueueInfo run() throws IOException, InterruptedException {
        return cluster.getQueue(queueName);
      }
    });
    if (queue == null) {
      return null;
    }
    org.apache.hadoop.mapreduce.JobStatus[] stats = 
      queue.getJobStatuses();
    JobStatus[] ret = new JobStatus[stats.length];
    for (int i = 0 ; i < stats.length; i++ ) {
      ret[i] = JobStatus.downgrade(stats[i]);
    }
    return ret;
  } catch (InterruptedException ie) {
    throw new IOException(ie);
  }
}
项目:hadoop-2.6.0-cdh5.4.3    文件:JobClient.java   
/**
 * Gets the queue information associated to a particular Job Queue
 * 
 * @param queueName name of the job queue.
 * @return Queue information associated to particular queue.
 * @throws IOException
 */
public JobQueueInfo getQueueInfo(final String queueName) throws IOException {
  try {
    QueueInfo queueInfo = clientUgi.doAs(new 
        PrivilegedExceptionAction<QueueInfo>() {
      public QueueInfo run() throws IOException, InterruptedException {
        return cluster.getQueue(queueName);
      }
    });
    if (queueInfo != null) {
      return new JobQueueInfo(queueInfo);
    }
    return null;
  } catch (InterruptedException ie) {
    throw new IOException(ie);
  }
}
项目:hadoop-plus    文件:JobClient.java   
/**
 * Gets all the jobs which were added to particular Job Queue
 * 
 * @param queueName name of the Job Queue
 * @return Array of jobs present in the job queue
 * @throws IOException
 */

public JobStatus[] getJobsFromQueue(final String queueName) throws IOException {
  try {
    QueueInfo queue = clientUgi.doAs(new PrivilegedExceptionAction<QueueInfo>() {
      @Override
      public QueueInfo run() throws IOException, InterruptedException {
        return cluster.getQueue(queueName);
      }
    });
    if (queue == null) {
      return null;
    }
    org.apache.hadoop.mapreduce.JobStatus[] stats = 
      queue.getJobStatuses();
    JobStatus[] ret = new JobStatus[stats.length];
    for (int i = 0 ; i < stats.length; i++ ) {
      ret[i] = JobStatus.downgrade(stats[i]);
    }
    return ret;
  } catch (InterruptedException ie) {
    throw new IOException(ie);
  }
}
项目:hadoop-plus    文件:JobClient.java   
/**
 * Gets the queue information associated to a particular Job Queue
 * 
 * @param queueName name of the job queue.
 * @return Queue information associated to particular queue.
 * @throws IOException
 */
public JobQueueInfo getQueueInfo(final String queueName) throws IOException {
  try {
    QueueInfo queueInfo = clientUgi.doAs(new 
        PrivilegedExceptionAction<QueueInfo>() {
      public QueueInfo run() throws IOException, InterruptedException {
        return cluster.getQueue(queueName);
      }
    });
    if (queueInfo != null) {
      return new JobQueueInfo(queueInfo);
    }
    return null;
  } catch (InterruptedException ie) {
    throw new IOException(ie);
  }
}
项目:hadoop    文件:ResourceMgrDelegate.java   
public QueueInfo getQueue(String queueName) throws IOException,
InterruptedException {
  try {
    org.apache.hadoop.yarn.api.records.QueueInfo queueInfo =
        client.getQueueInfo(queueName);
    return (queueInfo == null) ? null : TypeConverter.fromYarn(queueInfo,
        conf);
  } catch (YarnException e) {
    throw new IOException(e);
  }
}
项目:hadoop    文件:ResourceMgrDelegate.java   
public QueueInfo[] getQueues() throws IOException, InterruptedException {
  try {
    return TypeConverter.fromYarnQueueInfo(client.getAllQueues(), this.conf);
  } catch (YarnException e) {
    throw new IOException(e);
  }
}
项目:hadoop    文件:ResourceMgrDelegate.java   
public QueueInfo[] getRootQueues() throws IOException, InterruptedException {
  try {
    return TypeConverter.fromYarnQueueInfo(client.getRootQueueInfos(),
        this.conf);
  } catch (YarnException e) {
    throw new IOException(e);
  }
}
项目:hadoop    文件:ResourceMgrDelegate.java   
public QueueInfo[] getChildQueues(String parent) throws IOException,
    InterruptedException {
  try {
    return TypeConverter.fromYarnQueueInfo(client.getChildQueueInfos(parent),
      this.conf);
  } catch (YarnException e) {
    throw new IOException(e);
  }
}
项目:hadoop    文件:JobClient.java   
private JobQueueInfo getJobQueueInfo(QueueInfo queue) {
  JobQueueInfo ret = new JobQueueInfo(queue);
  // make sure to convert any children
  if (queue.getQueueChildren().size() > 0) {
    List<JobQueueInfo> childQueues = new ArrayList<JobQueueInfo>(queue
        .getQueueChildren().size());
    for (QueueInfo child : queue.getQueueChildren()) {
      childQueues.add(getJobQueueInfo(child));
    }
    ret.setChildren(childQueues);
  }
  return ret;
}
项目:hadoop    文件:JobClient.java   
private JobQueueInfo[] getJobQueueInfoArray(QueueInfo[] queues)
    throws IOException {
  JobQueueInfo[] ret = new JobQueueInfo[queues.length];
  for (int i = 0; i < queues.length; i++) {
    ret[i] = getJobQueueInfo(queues[i]);
  }
  return ret;
}
项目:hadoop    文件:JobQueueInfo.java   
JobQueueInfo(QueueInfo queue) {
  this(queue.getQueueName(), queue.getSchedulingInfo());
  setQueueState(queue.getState().getStateName());
  setQueueChildren(queue.getQueueChildren());
  setProperties(queue.getProperties());
  setJobStatuses(queue.getJobStatuses());
}
项目:hadoop    文件:JobQueueInfo.java   
@InterfaceAudience.Private
public void setChildren(List<JobQueueInfo> children) {
  List<QueueInfo> list = new ArrayList<QueueInfo>();
  for (JobQueueInfo q : children) {
    list.add(q);
  }
  super.setQueueChildren(list);
}
项目:hadoop    文件:JobQueueInfo.java   
public List<JobQueueInfo> getChildren() {
  List<JobQueueInfo> list = new ArrayList<JobQueueInfo>();
  for (QueueInfo q : super.getQueueChildren()) {
    list.add((JobQueueInfo)q);
  }
  return list;
}
项目:aliyun-oss-hadoop-fs    文件:ResourceMgrDelegate.java   
public QueueInfo getQueue(String queueName) throws IOException,
InterruptedException {
  try {
    org.apache.hadoop.yarn.api.records.QueueInfo queueInfo =
        client.getQueueInfo(queueName);
    return (queueInfo == null) ? null : TypeConverter.fromYarn(queueInfo,
        conf);
  } catch (YarnException e) {
    throw new IOException(e);
  }
}
项目:aliyun-oss-hadoop-fs    文件:ResourceMgrDelegate.java   
public QueueInfo[] getQueues() throws IOException, InterruptedException {
  try {
    return TypeConverter.fromYarnQueueInfo(client.getAllQueues(), this.conf);
  } catch (YarnException e) {
    throw new IOException(e);
  }
}
项目:aliyun-oss-hadoop-fs    文件:ResourceMgrDelegate.java   
public QueueInfo[] getRootQueues() throws IOException, InterruptedException {
  try {
    return TypeConverter.fromYarnQueueInfo(client.getRootQueueInfos(),
        this.conf);
  } catch (YarnException e) {
    throw new IOException(e);
  }
}
项目:aliyun-oss-hadoop-fs    文件:ResourceMgrDelegate.java   
public QueueInfo[] getChildQueues(String parent) throws IOException,
    InterruptedException {
  try {
    return TypeConverter.fromYarnQueueInfo(client.getChildQueueInfos(parent),
      this.conf);
  } catch (YarnException e) {
    throw new IOException(e);
  }
}
项目:aliyun-oss-hadoop-fs    文件:JobClient.java   
private JobQueueInfo getJobQueueInfo(QueueInfo queue) {
  JobQueueInfo ret = new JobQueueInfo(queue);
  // make sure to convert any children
  if (queue.getQueueChildren().size() > 0) {
    List<JobQueueInfo> childQueues = new ArrayList<JobQueueInfo>(queue
        .getQueueChildren().size());
    for (QueueInfo child : queue.getQueueChildren()) {
      childQueues.add(getJobQueueInfo(child));
    }
    ret.setChildren(childQueues);
  }
  return ret;
}
项目:aliyun-oss-hadoop-fs    文件:JobClient.java   
private JobQueueInfo[] getJobQueueInfoArray(QueueInfo[] queues)
    throws IOException {
  JobQueueInfo[] ret = new JobQueueInfo[queues.length];
  for (int i = 0; i < queues.length; i++) {
    ret[i] = getJobQueueInfo(queues[i]);
  }
  return ret;
}
项目:aliyun-oss-hadoop-fs    文件:JobQueueInfo.java   
JobQueueInfo(QueueInfo queue) {
  this(queue.getQueueName(), queue.getSchedulingInfo());
  setQueueState(queue.getState().getStateName());
  setQueueChildren(queue.getQueueChildren());
  setProperties(queue.getProperties());
  setJobStatuses(queue.getJobStatuses());
}
项目:aliyun-oss-hadoop-fs    文件:JobQueueInfo.java   
@InterfaceAudience.Private
public void setChildren(List<JobQueueInfo> children) {
  List<QueueInfo> list = new ArrayList<QueueInfo>();
  for (JobQueueInfo q : children) {
    list.add(q);
  }
  super.setQueueChildren(list);
}
项目:aliyun-oss-hadoop-fs    文件:JobQueueInfo.java   
public List<JobQueueInfo> getChildren() {
  List<JobQueueInfo> list = new ArrayList<JobQueueInfo>();
  for (QueueInfo q : super.getQueueChildren()) {
    list.add((JobQueueInfo)q);
  }
  return list;
}
项目:big-c    文件:ResourceMgrDelegate.java   
public QueueInfo getQueue(String queueName) throws IOException,
InterruptedException {
  try {
    org.apache.hadoop.yarn.api.records.QueueInfo queueInfo =
        client.getQueueInfo(queueName);
    return (queueInfo == null) ? null : TypeConverter.fromYarn(queueInfo,
        conf);
  } catch (YarnException e) {
    throw new IOException(e);
  }
}
项目:big-c    文件:ResourceMgrDelegate.java   
public QueueInfo[] getQueues() throws IOException, InterruptedException {
  try {
    return TypeConverter.fromYarnQueueInfo(client.getAllQueues(), this.conf);
  } catch (YarnException e) {
    throw new IOException(e);
  }
}
项目:big-c    文件:ResourceMgrDelegate.java   
public QueueInfo[] getRootQueues() throws IOException, InterruptedException {
  try {
    return TypeConverter.fromYarnQueueInfo(client.getRootQueueInfos(),
        this.conf);
  } catch (YarnException e) {
    throw new IOException(e);
  }
}
项目:big-c    文件:ResourceMgrDelegate.java   
public QueueInfo[] getChildQueues(String parent) throws IOException,
    InterruptedException {
  try {
    return TypeConverter.fromYarnQueueInfo(client.getChildQueueInfos(parent),
      this.conf);
  } catch (YarnException e) {
    throw new IOException(e);
  }
}
项目:big-c    文件:JobClient.java   
private JobQueueInfo getJobQueueInfo(QueueInfo queue) {
  JobQueueInfo ret = new JobQueueInfo(queue);
  // make sure to convert any children
  if (queue.getQueueChildren().size() > 0) {
    List<JobQueueInfo> childQueues = new ArrayList<JobQueueInfo>(queue
        .getQueueChildren().size());
    for (QueueInfo child : queue.getQueueChildren()) {
      childQueues.add(getJobQueueInfo(child));
    }
    ret.setChildren(childQueues);
  }
  return ret;
}
项目:big-c    文件:JobClient.java   
private JobQueueInfo[] getJobQueueInfoArray(QueueInfo[] queues)
    throws IOException {
  JobQueueInfo[] ret = new JobQueueInfo[queues.length];
  for (int i = 0; i < queues.length; i++) {
    ret[i] = getJobQueueInfo(queues[i]);
  }
  return ret;
}
项目:big-c    文件:JobQueueInfo.java   
JobQueueInfo(QueueInfo queue) {
  this(queue.getQueueName(), queue.getSchedulingInfo());
  setQueueState(queue.getState().getStateName());
  setQueueChildren(queue.getQueueChildren());
  setProperties(queue.getProperties());
  setJobStatuses(queue.getJobStatuses());
}
项目:big-c    文件:JobQueueInfo.java   
@InterfaceAudience.Private
public void setChildren(List<JobQueueInfo> children) {
  List<QueueInfo> list = new ArrayList<QueueInfo>();
  for (JobQueueInfo q : children) {
    list.add(q);
  }
  super.setQueueChildren(list);
}
项目:big-c    文件:JobQueueInfo.java   
public List<JobQueueInfo> getChildren() {
  List<JobQueueInfo> list = new ArrayList<JobQueueInfo>();
  for (QueueInfo q : super.getQueueChildren()) {
    list.add((JobQueueInfo)q);
  }
  return list;
}
项目:hadoop-2.6.0-cdh5.4.3    文件:ResourceMgrDelegate.java   
public QueueInfo getQueue(String queueName) throws IOException,
InterruptedException {
  try {
    org.apache.hadoop.yarn.api.records.QueueInfo queueInfo =
        client.getQueueInfo(queueName);
    return (queueInfo == null) ? null : TypeConverter.fromYarn(queueInfo,
        conf);
  } catch (YarnException e) {
    throw new IOException(e);
  }
}
项目:hops    文件:JobClient.java   
private JobQueueInfo getJobQueueInfo(QueueInfo queue) {
  JobQueueInfo ret = new JobQueueInfo(queue);
  // make sure to convert any children
  if (queue.getQueueChildren().size() > 0) {
    List<JobQueueInfo> childQueues = new ArrayList<JobQueueInfo>(queue
        .getQueueChildren().size());
    for (QueueInfo child : queue.getQueueChildren()) {
      childQueues.add(getJobQueueInfo(child));
    }
    ret.setChildren(childQueues);
  }
  return ret;
}
项目:hadoop-2.6.0-cdh5.4.3    文件:ResourceMgrDelegate.java   
public QueueInfo[] getRootQueues() throws IOException, InterruptedException {
  try {
    return TypeConverter.fromYarnQueueInfo(client.getRootQueueInfos(),
        this.conf);
  } catch (YarnException e) {
    throw new IOException(e);
  }
}