TypeConverter { public static QueueInfo[] fromYarnQueueInfo( List<org.apache.hadoop.yarn.api.records.QueueInfo> queues, Configuration conf) { List<QueueInfo> queueInfos = new ArrayList<QueueInfo>(queues.size()); for (org.apache.hadoop.yarn.api.records.QueueInfo queue : queues) { queueInfos.add(TypeConverter.fromYarn(queue, conf)); } return queueInfos.toArray(new QueueInfo[queueInfos.size()]); }  static org.apache.hadoop.mapred.JobID fromYarn(JobId id); static org.apache.hadoop.mapreduce.JobID fromYarn(ApplicationId appID); static JobId toYarn(org.apache.hadoop.mapreduce.JobID id); static int toYarnApplicationPriority(String priority); static org.apache.hadoop.mapreduce.TaskType fromYarn(
      TaskType taskType); static TaskType toYarn(org.apache.hadoop.mapreduce.TaskType taskType); static org.apache.hadoop.mapred.TaskID fromYarn(TaskId id); static TaskId toYarn(org.apache.hadoop.mapreduce.TaskID id); static TaskAttemptState toYarn(
      org.apache.hadoop.mapred.TaskStatus.State state); static Phase toYarn(org.apache.hadoop.mapred.TaskStatus.Phase phase); static TaskCompletionEvent[] fromYarn(
      TaskAttemptCompletionEvent[] newEvents); static TaskCompletionEvent fromYarn(
      TaskAttemptCompletionEvent newEvent); static TaskCompletionEvent.Status fromYarn(
      TaskAttemptCompletionEventStatus newStatus); static org.apache.hadoop.mapred.TaskAttemptID fromYarn(
      TaskAttemptId id); static TaskAttemptId toYarn(
      org.apache.hadoop.mapred.TaskAttemptID id); static TaskAttemptId toYarn(
      org.apache.hadoop.mapreduce.TaskAttemptID id); static org.apache.hadoop.mapreduce.Counters fromYarn(
      Counters yCntrs); static Counters toYarn(org.apache.hadoop.mapred.Counters counters); static Counters toYarn(org.apache.hadoop.mapreduce.Counters counters); static JobStatus fromYarn(JobReport jobreport, String trackingUrl); static org.apache.hadoop.mapreduce.JobPriority fromYarnApplicationPriority(int priority); static org.apache.hadoop.mapreduce.QueueState fromYarn(
      QueueState state); static int fromYarn(JobState state); static org.apache.hadoop.mapred.TIPStatus fromYarn(
      TaskState state); static TaskReport fromYarn(org.apache.hadoop.mapreduce.v2.api.records.TaskReport report); static List<TaskReport> fromYarn(
      List<org.apache.hadoop.mapreduce.v2.api.records.TaskReport> taskReports); static State fromYarn(YarnApplicationState yarnApplicationState,
      FinalApplicationStatus finalApplicationStatus); static TaskTrackerInfo fromYarn(NodeReport node); static TaskTrackerInfo[] fromYarnNodes(List<NodeReport> nodes); static JobStatus fromYarn(ApplicationReport application,
      String jobFile); static JobStatus[] fromYarnApps(List<ApplicationReport> applications,
      Configuration conf); static QueueInfo fromYarn(org.apache.hadoop.yarn.api.records.QueueInfo
      queueInfo, Configuration conf); static QueueInfo[] fromYarnQueueInfo(
      List<org.apache.hadoop.yarn.api.records.QueueInfo> queues,
      Configuration conf); static QueueAclsInfo[] fromYarnQueueUserAclsInfo(
      List<QueueUserACLInfo> userAcls);  }
@Test public void testFromYarnQueueInfo() { org.apache.hadoop.yarn.api.records.QueueInfo queueInfo = Records .newRecord(org.apache.hadoop.yarn.api.records.QueueInfo.class); queueInfo.setQueueState(org.apache.hadoop.yarn.api.records.QueueState.STOPPED); org.apache.hadoop.mapreduce.QueueInfo returned = TypeConverter.fromYarn(queueInfo, new Configuration()); Assert.assertEquals("queueInfo translation didn't work.", returned.getState().toString(), StringUtils.toLowerCase(queueInfo.getQueueState().toString())); }