public JobStatus[] getAllJobs() throws IOException, InterruptedException { try { Set<String> appTypes = new HashSet<String>(1); appTypes.add(MRJobConfig.MR_APPLICATION_TYPE); EnumSet<YarnApplicationState> appStates = EnumSet.noneOf(YarnApplicationState.class); return TypeConverter.fromYarnApps( client.getApplications(appTypes, appStates), this.conf); } catch (YarnException e) { throw new IOException(e); } }
public JobStatus[] getAllJobs() throws IOException, InterruptedException { try { Set<String> appTypes = new HashSet<String>(1); appTypes.add(TezConstants.TEZ_APPLICATION_TYPE); return TypeConverter.fromYarnApps(client.getApplications(appTypes), this.conf); } catch (YarnException e) { throw new IOException(e); } }
public JobStatus[] getAllJobs() throws IOException, InterruptedException { try { Set<String> appTypes = new HashSet<String>(1); appTypes.add(MRJobConfig.MR_APPLICATION_TYPE); EnumSet<YarnApplicationState> appStates = EnumSet.noneOf(YarnApplicationState.class); return TypeConverter.fromYarnApps( client.getApplications(appTypes, appStates), this.conf); } catch (YarnException e) { throw new IOException(e); } }
public static QueueInfo fromYarn(org.apache.hadoop.yarn.api.records.QueueInfo queueInfo, Configuration conf) { QueueInfo toReturn = new QueueInfo(queueInfo.getQueueName(), "Capacity: " + queueInfo.getCapacity() * 100 + ", MaximumCapacity: " + (queueInfo.getMaximumCapacity() < 0 ? "UNDEFINED" : queueInfo.getMaximumCapacity() * 100) + ", CurrentCapacity: " + queueInfo.getCurrentCapacity() * 100, fromYarn(queueInfo.getQueueState()), TypeConverter.fromYarnApps(queueInfo.getApplications(), conf)); List<QueueInfo> childQueues = new ArrayList<QueueInfo>(); for(org.apache.hadoop.yarn.api.records.QueueInfo childQueue : queueInfo.getChildQueues()) { childQueues.add(fromYarn(childQueue, conf)); } toReturn.setQueueChildren(childQueues); return toReturn; }
public static QueueInfo fromYarn(org.apache.hadoop.yarn.api.records.QueueInfo queueInfo, Configuration conf) { QueueInfo toReturn = new QueueInfo(queueInfo.getQueueName(), "Capacity: " + queueInfo.getCapacity() * 100 + ", MaximumCapacity: " + (queueInfo.getMaximumCapacity() < 0 ? "UNDEFINED" : queueInfo.getMaximumCapacity() * 100) + ", CurrentCapacity: " + queueInfo.getCurrentCapacity() * 100, fromYarn(queueInfo.getQueueState()), TypeConverter.fromYarnApps(queueInfo.getApplications(), conf)); List<QueueInfo> childQueues = new ArrayList<QueueInfo>(); for(org.apache.hadoop.yarn.api.records.QueueInfo childQueue : queueInfo.getChildQueues()) { childQueues.add(fromYarn(childQueue, conf)); } toReturn.setQueueChildren(childQueues); return toReturn; }
public static QueueInfo fromYarn(org.apache.hadoop.yarn.api.records.QueueInfo queueInfo, Configuration conf) { QueueInfo toReturn = new QueueInfo(queueInfo.getQueueName(), "Capacity: " + queueInfo.getCapacity() * 100 + ", MaximumCapacity: " + (queueInfo.getMaximumCapacity() < 0 ? "UNDEFINED" : queueInfo.getMaximumCapacity() * 100) + ", CurrentCapacity: " + queueInfo.getCurrentCapacity() * 100, fromYarn(queueInfo.getQueueState()), TypeConverter.fromYarnApps(queueInfo.getApplications(), conf)); List<QueueInfo> childQueues = new ArrayList<QueueInfo>(); for(org.apache.hadoop.yarn.api.records.QueueInfo childQueue : queueInfo.getChildQueues()) { childQueues.add(fromYarn(childQueue, conf)); } toReturn.setQueueChildren(childQueues); return toReturn; }
public static QueueInfo fromYarn(org.apache.hadoop.yarn.api.records.QueueInfo queueInfo, Configuration conf) { QueueInfo toReturn = new QueueInfo(queueInfo.getQueueName(), "Capacity: " + queueInfo.getCapacity() * 100 + ", MaximumCapacity: " + (queueInfo.getMaximumCapacity() < 0 ? "UNDEFINED" : queueInfo.getMaximumCapacity() * 100) + ", CurrentCapacity: " + queueInfo.getCurrentCapacity() * 100, fromYarn(queueInfo.getQueueState()), TypeConverter.fromYarnApps(queueInfo.getApplications(), conf)); List<QueueInfo> childQueues = new ArrayList<QueueInfo>(); for(org.apache.hadoop.yarn.api.records.QueueInfo childQueue : queueInfo.getChildQueues()) { childQueues.add(fromYarn(childQueue, conf)); } toReturn.setQueueChildren(childQueues); return toReturn; }