svn merge -c 1375602 FIXES: MAPREDUCE-3506. Calling getPriority on JobInfo after parsing a history log with JobHistoryParser throws a NullPointerException (Jason Lowe via bobby)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1375604 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c0b9b996f9
commit
f3f8edbd10
|
@ -694,6 +694,9 @@ Release 0.23.3 - UNRELEASED
|
|||
MAPREDUCE-4053. Counters group names deprecation is wrong, iterating over
|
||||
group names deprecated names don't show up (Robert Evans via tgraves)
|
||||
|
||||
MAPREDUCE-3506. Calling getPriority on JobInfo after parsing a history log
|
||||
with JobHistoryParser throws a NullPointerException (Jason Lowe via bobby)
|
||||
|
||||
Release 0.23.2 - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -441,6 +441,7 @@ public class JobHistoryParser {
|
|||
username = jobname = jobConfPath = jobQueueName = "";
|
||||
tasksMap = new HashMap<TaskID, TaskInfo>();
|
||||
jobACLs = new HashMap<JobACL, AccessControlList>();
|
||||
priority = JobPriority.NORMAL;
|
||||
}
|
||||
|
||||
/** Print all the job information */
|
||||
|
@ -454,13 +455,21 @@ public class JobHistoryParser {
|
|||
System.out.println("PRIORITY: " + priority);
|
||||
System.out.println("TOTAL_MAPS: " + totalMaps);
|
||||
System.out.println("TOTAL_REDUCES: " + totalReduces);
|
||||
if (mapCounters != null) {
|
||||
System.out.println("MAP_COUNTERS:" + mapCounters.toString());
|
||||
}
|
||||
if (reduceCounters != null) {
|
||||
System.out.println("REDUCE_COUNTERS:" + reduceCounters.toString());
|
||||
}
|
||||
if (totalCounters != null) {
|
||||
System.out.println("TOTAL_COUNTERS: " + totalCounters.toString());
|
||||
}
|
||||
System.out.println("UBERIZED: " + uberized);
|
||||
if (amInfos != null) {
|
||||
for (AMInfo amInfo : amInfos) {
|
||||
amInfo.printAll();
|
||||
}
|
||||
}
|
||||
for (TaskInfo ti: tasksMap.values()) {
|
||||
ti.printAll();
|
||||
}
|
||||
|
|
|
@ -83,6 +83,13 @@ public class TestJobHistoryParsing {
|
|||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testJobInfo() throws Exception {
|
||||
JobInfo info = new JobInfo();
|
||||
Assert.assertEquals("NORMAL", info.getPriority());
|
||||
info.printAll();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHistoryParsing() throws Exception {
|
||||
LOG.info("STARTING testHistoryParsing()");
|
||||
|
|
Loading…
Reference in New Issue