conf.get(MRJobConfig.QUEUE_NAME),
sub.get(conf.get(Gridmix.ORIGINAL_JOB_ID)).getQueueName());
}
final String originalJobId = conf.get(Gridmix.ORIGINAL_JOB_ID);
final JobStory spec = sub.get(originalJobId);
assertNotNull("No spec for " + jobName, spec);
assertNotNull("No counters for " + jobName, job.getCounters());
final String originalJobName = spec.getName();
System.out.println("originalJobName=" + originalJobName
+ ";GridmixJobName=" + jobName + ";originalJobID=" + originalJobId);
assertTrue("Original job name is wrong.", originalJobName.equals(
conf.get(Gridmix.ORIGINAL_JOB_NAME)));
// Gridmix job seqNum contains 6 digits
int seqNumLength = 6;
String jobSeqNum = new DecimalFormat("000000").format(
conf.getInt(GridmixJob.GRIDMIX_JOB_SEQ, -1));
// Original job name is of the format MOCKJOB<6 digit sequence number>
// because MockJob jobNames are of this format.
assertTrue(originalJobName.substring(
originalJobName.length() - seqNumLength).equals(jobSeqNum));
assertTrue("Gridmix job name is not in the expected format.",
jobName.equals(
GridmixJob.JOB_NAME_PREFIX + jobSeqNum));
final FileStatus stat =
GridmixTestUtils.dfs.getFileStatus(
new Path(out, "" + Integer.valueOf(jobSeqNum)));
assertEquals("Wrong owner for " + jobName, spec.getUser(),
stat.getOwner());
final int nMaps = spec.getNumberMaps();
final int nReds = spec.getNumberReduces();
// TODO Blocked by MAPREDUCE-118
if (true) return;
// TODO
System.out.println(jobName + ": " + nMaps + "/" + nReds);