org.apache.hadoop.mapreduce.QueueInfo Java Examples
The following examples show how to use
org.apache.hadoop.mapreduce.QueueInfo.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JobClient.java From big-c with Apache License 2.0 | 6 votes |
/** * 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); } }
Example #2
Source File: JobClient.java From big-c with Apache License 2.0 | 6 votes |
/** * 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); } }
Example #3
Source File: JobClient.java From hadoop with Apache License 2.0 | 6 votes |
/** * 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); } }
Example #4
Source File: JobClient.java From hadoop with Apache License 2.0 | 6 votes |
/** * 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); } }
Example #5
Source File: ResourceMgrDelegate.java From tez with Apache License 2.0 | 5 votes |
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); } }
Example #6
Source File: ResourceMgrDelegate.java From incubator-tez with Apache License 2.0 | 5 votes |
public QueueInfo[] getChildQueues(String parent) throws IOException, InterruptedException { try { return TypeConverter.fromYarnQueueInfo(client.getChildQueueInfos(parent), this.conf); } catch (YarnException e) { throw new IOException(e); } }
Example #7
Source File: JobClient.java From hadoop with Apache License 2.0 | 5 votes |
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; }
Example #8
Source File: ResourceMgrDelegate.java From tez with Apache License 2.0 | 5 votes |
public QueueInfo[] getQueues() throws IOException, InterruptedException { try { return TypeConverter.fromYarnQueueInfo(client.getAllQueues(), this.conf); } catch (YarnException e) { throw new IOException(e); } }
Example #9
Source File: ResourceMgrDelegate.java From tez with Apache License 2.0 | 5 votes |
public QueueInfo[] getRootQueues() throws IOException, InterruptedException { try { return TypeConverter.fromYarnQueueInfo(client.getRootQueueInfos(), this.conf); } catch (YarnException e) { throw new IOException(e); } }
Example #10
Source File: ResourceMgrDelegate.java From tez with Apache License 2.0 | 5 votes |
public QueueInfo[] getChildQueues(String parent) throws IOException, InterruptedException { try { return TypeConverter.fromYarnQueueInfo(client.getChildQueueInfos(parent), this.conf); } catch (YarnException e) { throw new IOException(e); } }
Example #11
Source File: ResourceMgrDelegate.java From hadoop with Apache License 2.0 | 5 votes |
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); } }
Example #12
Source File: ResourceMgrDelegate.java From hadoop with Apache License 2.0 | 5 votes |
public QueueInfo[] getChildQueues(String parent) throws IOException, InterruptedException { try { return TypeConverter.fromYarnQueueInfo(client.getChildQueueInfos(parent), this.conf); } catch (YarnException e) { throw new IOException(e); } }
Example #13
Source File: ResourceMgrDelegate.java From hadoop with Apache License 2.0 | 5 votes |
public QueueInfo[] getRootQueues() throws IOException, InterruptedException { try { return TypeConverter.fromYarnQueueInfo(client.getRootQueueInfos(), this.conf); } catch (YarnException e) { throw new IOException(e); } }
Example #14
Source File: ResourceMgrDelegate.java From hadoop with Apache License 2.0 | 5 votes |
public QueueInfo[] getQueues() throws IOException, InterruptedException { try { return TypeConverter.fromYarnQueueInfo(client.getAllQueues(), this.conf); } catch (YarnException e) { throw new IOException(e); } }
Example #15
Source File: JobClient.java From hadoop with Apache License 2.0 | 5 votes |
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; }
Example #16
Source File: JobQueueInfo.java From hadoop with Apache License 2.0 | 5 votes |
JobQueueInfo(QueueInfo queue) { this(queue.getQueueName(), queue.getSchedulingInfo()); setQueueState(queue.getState().getStateName()); setQueueChildren(queue.getQueueChildren()); setProperties(queue.getProperties()); setJobStatuses(queue.getJobStatuses()); }
Example #17
Source File: JobQueueInfo.java From hadoop with Apache License 2.0 | 5 votes |
@InterfaceAudience.Private public void setChildren(List<JobQueueInfo> children) { List<QueueInfo> list = new ArrayList<QueueInfo>(); for (JobQueueInfo q : children) { list.add(q); } super.setQueueChildren(list); }
Example #18
Source File: JobQueueInfo.java From hadoop with Apache License 2.0 | 5 votes |
public List<JobQueueInfo> getChildren() { List<JobQueueInfo> list = new ArrayList<JobQueueInfo>(); for (QueueInfo q : super.getQueueChildren()) { list.add((JobQueueInfo)q); } return list; }
Example #19
Source File: ResourceMgrDelegate.java From incubator-tez with Apache License 2.0 | 5 votes |
public QueueInfo[] getRootQueues() throws IOException, InterruptedException { try { return TypeConverter.fromYarnQueueInfo(client.getRootQueueInfos(), this.conf); } catch (YarnException e) { throw new IOException(e); } }
Example #20
Source File: ResourceMgrDelegate.java From incubator-tez with Apache License 2.0 | 5 votes |
public QueueInfo[] getQueues() throws IOException, InterruptedException { try { return TypeConverter.fromYarnQueueInfo(client.getAllQueues(), this.conf); } catch (YarnException e) { throw new IOException(e); } }
Example #21
Source File: ResourceMgrDelegate.java From incubator-tez with Apache License 2.0 | 5 votes |
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); } }
Example #22
Source File: ResourceMgrDelegate.java From big-c with Apache License 2.0 | 5 votes |
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); } }
Example #23
Source File: ResourceMgrDelegate.java From big-c with Apache License 2.0 | 5 votes |
public QueueInfo[] getQueues() throws IOException, InterruptedException { try { return TypeConverter.fromYarnQueueInfo(client.getAllQueues(), this.conf); } catch (YarnException e) { throw new IOException(e); } }
Example #24
Source File: ResourceMgrDelegate.java From big-c with Apache License 2.0 | 5 votes |
public QueueInfo[] getRootQueues() throws IOException, InterruptedException { try { return TypeConverter.fromYarnQueueInfo(client.getRootQueueInfos(), this.conf); } catch (YarnException e) { throw new IOException(e); } }
Example #25
Source File: ResourceMgrDelegate.java From big-c with Apache License 2.0 | 5 votes |
public QueueInfo[] getChildQueues(String parent) throws IOException, InterruptedException { try { return TypeConverter.fromYarnQueueInfo(client.getChildQueueInfos(parent), this.conf); } catch (YarnException e) { throw new IOException(e); } }
Example #26
Source File: JobQueueInfo.java From big-c with Apache License 2.0 | 5 votes |
public List<JobQueueInfo> getChildren() { List<JobQueueInfo> list = new ArrayList<JobQueueInfo>(); for (QueueInfo q : super.getQueueChildren()) { list.add((JobQueueInfo)q); } return list; }
Example #27
Source File: JobQueueInfo.java From big-c with Apache License 2.0 | 5 votes |
@InterfaceAudience.Private public void setChildren(List<JobQueueInfo> children) { List<QueueInfo> list = new ArrayList<QueueInfo>(); for (JobQueueInfo q : children) { list.add(q); } super.setQueueChildren(list); }
Example #28
Source File: JobQueueInfo.java From big-c with Apache License 2.0 | 5 votes |
JobQueueInfo(QueueInfo queue) { this(queue.getQueueName(), queue.getSchedulingInfo()); setQueueState(queue.getState().getStateName()); setQueueChildren(queue.getQueueChildren()); setProperties(queue.getProperties()); setJobStatuses(queue.getJobStatuses()); }
Example #29
Source File: JobClient.java From big-c with Apache License 2.0 | 5 votes |
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; }
Example #30
Source File: JobClient.java From big-c with Apache License 2.0 | 5 votes |
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; }