hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s..@apache.org
Subject svn commit: r1175218 - in /hadoop/common/branches/branch-0.22/mapreduce: CHANGES.txt src/java/org/apache/hadoop/mapred/JobQueueInfo.java src/java/org/apache/hadoop/mapred/JobTracker.java
Date Sat, 24 Sep 2011 18:34:21 GMT
Author: shv
Date: Sat Sep 24 18:34:20 2011
New Revision: 1175218

URL: http://svn.apache.org/viewvc?rev=1175218&view=rev
Log:
MAPREDUCE-3026. Fix NPE in mapred queue -list with hierarchical queues. Contributed by Mayank
Bansal.

Modified:
    hadoop/common/branches/branch-0.22/mapreduce/CHANGES.txt
    hadoop/common/branches/branch-0.22/mapreduce/src/java/org/apache/hadoop/mapred/JobQueueInfo.java
    hadoop/common/branches/branch-0.22/mapreduce/src/java/org/apache/hadoop/mapred/JobTracker.java

Modified: hadoop/common/branches/branch-0.22/mapreduce/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.22/mapreduce/CHANGES.txt?rev=1175218&r1=1175217&r2=1175218&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.22/mapreduce/CHANGES.txt (original)
+++ hadoop/common/branches/branch-0.22/mapreduce/CHANGES.txt Sat Sep 24 18:34:20 2011
@@ -608,6 +608,9 @@ Release 0.22.0 - Unreleased
 
     MAPREDUCE-3025. Contribs not building. (Joep Rottinghuis via shv)
 
+    MAPREDUCE-3026. Fix NPE in mapred queue -list with hierarchical queues.
+    (Mayank Bansal via shv)
+
 Release 0.21.1 - Unreleased
 
   NEW FEATURES

Modified: hadoop/common/branches/branch-0.22/mapreduce/src/java/org/apache/hadoop/mapred/JobQueueInfo.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.22/mapreduce/src/java/org/apache/hadoop/mapred/JobQueueInfo.java?rev=1175218&r1=1175217&r2=1175218&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.22/mapreduce/src/java/org/apache/hadoop/mapred/JobQueueInfo.java
(original)
+++ hadoop/common/branches/branch-0.22/mapreduce/src/java/org/apache/hadoop/mapred/JobQueueInfo.java
Sat Sep 24 18:34:20 2011
@@ -105,7 +105,7 @@ public class JobQueueInfo extends QueueI
   public List<JobQueueInfo> getChildren() {
     List<JobQueueInfo> list = new ArrayList<JobQueueInfo>();
     for (QueueInfo q : super.getQueueChildren()) {
-      list.add((JobQueueInfo)q);
+      list.add(q instanceof JobQueueInfo? (JobQueueInfo)q : new JobQueueInfo(q));
     }
     return list;
   }

Modified: hadoop/common/branches/branch-0.22/mapreduce/src/java/org/apache/hadoop/mapred/JobTracker.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.22/mapreduce/src/java/org/apache/hadoop/mapred/JobTracker.java?rev=1175218&r1=1175217&r2=1175218&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.22/mapreduce/src/java/org/apache/hadoop/mapred/JobTracker.java
(original)
+++ hadoop/common/branches/branch-0.22/mapreduce/src/java/org/apache/hadoop/mapred/JobTracker.java
Sat Sep 24 18:34:20 2011
@@ -4317,6 +4317,9 @@ public class JobTracker implements MRCon
       throws IOException {
     for (JobQueueInfo queue : queues) {
       queue.setJobStatuses(getJobsFromQueue(queue.getQueueName()));
+      for(JobQueueInfo childqueue : queue.getChildren()){
+    	  childqueue.setJobStatuses(getJobsFromQueue(childqueue.getQueueName()));
+      }
     }
     return queues;
   }



Mime
View raw message