hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha...@apache.org
Subject svn commit: r1133274 - in /hadoop/common/branches/branch-0.20-security-205: CHANGES.txt src/mapred/org/apache/hadoop/mapred/JobInProgress.java src/mapred/org/apache/hadoop/mapred/JobTracker.java src/test/org/apache/hadoop/mapred/TestJobHistoryConfig.java
Date Wed, 08 Jun 2011 07:59:41 GMT
Author: mahadev
Date: Wed Jun  8 07:59:41 2011
New Revision: 1133274

URL: http://svn.apache.org/viewvc?rev=1133274&view=rev
Log:
MAPREDUCE-2558. Add queue-level metrics 0.20-security branch - test fix (jeffrey nasbit via
mahadev)

Modified:
    hadoop/common/branches/branch-0.20-security-205/CHANGES.txt
    hadoop/common/branches/branch-0.20-security-205/src/mapred/org/apache/hadoop/mapred/JobInProgress.java
    hadoop/common/branches/branch-0.20-security-205/src/mapred/org/apache/hadoop/mapred/JobTracker.java
    hadoop/common/branches/branch-0.20-security-205/src/test/org/apache/hadoop/mapred/TestJobHistoryConfig.java

Modified: hadoop/common/branches/branch-0.20-security-205/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-205/CHANGES.txt?rev=1133274&r1=1133273&r2=1133274&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-205/CHANGES.txt (original)
+++ hadoop/common/branches/branch-0.20-security-205/CHANGES.txt Wed Jun  8 07:59:41 2011
@@ -62,6 +62,9 @@ Release 0.20.205.0 - unreleased
     HDFS-2044. TestQueueProcessingStatistics failing automatic test due to 
     timing issues. (mattf)
 
+    MAPREDUCE-2558. Add queue-level metrics 0.20-security branch - test fix
+    (jeffrey nasbit via mahadev)
+    
 Release 0.20.204.0 - unreleased
 
   NEW FEATURES

Modified: hadoop/common/branches/branch-0.20-security-205/src/mapred/org/apache/hadoop/mapred/JobInProgress.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-205/src/mapred/org/apache/hadoop/mapred/JobInProgress.java?rev=1133274&r1=1133273&r2=1133274&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-205/src/mapred/org/apache/hadoop/mapred/JobInProgress.java
(original)
+++ hadoop/common/branches/branch-0.20-security-205/src/mapred/org/apache/hadoop/mapred/JobInProgress.java
Wed Jun  8 07:59:41 2011
@@ -349,7 +349,11 @@ public class JobInProgress {
     this.mapFailuresPercent = conf.getMaxMapTaskFailuresPercent();
     this.reduceFailuresPercent = conf.getMaxReduceTaskFailuresPercent();
 
-    this.queueMetrics = this.jobtracker.getQueueManager().getQueue(queueName).getMetrics();
+    Queue queue = this.jobtracker.getQueueManager().getQueue(queueName);
+    if (queue == null) {
+      throw new IOException("Queue \"" + queueName + "\" does not exist");
+    }
+    this.queueMetrics = queue.getMetrics();
 
     // Check task limits
     checkTaskLimits();
@@ -427,7 +431,11 @@ public class JobInProgress {
       this.profile = new JobProfile(user, jobId, 
           jobFile, url, conf.getJobName(), queueName);
 
-      this.queueMetrics = this.jobtracker.getQueueManager().getQueue(queueName).getMetrics();
+      Queue queue = this.jobtracker.getQueueManager().getQueue(queueName);
+      if (queue == null) {
+        throw new IOException("Queue \"" + queueName + "\" does not exist");
+      }
+      this.queueMetrics = queue.getMetrics();
       this.queueMetrics.addPrepJob(conf, jobId);
 
       this.submitHostName = conf.getJobSubmitHostName();

Modified: hadoop/common/branches/branch-0.20-security-205/src/mapred/org/apache/hadoop/mapred/JobTracker.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-205/src/mapred/org/apache/hadoop/mapred/JobTracker.java?rev=1133274&r1=1133273&r2=1133274&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-205/src/mapred/org/apache/hadoop/mapred/JobTracker.java
(original)
+++ hadoop/common/branches/branch-0.20-security-205/src/mapred/org/apache/hadoop/mapred/JobTracker.java
Wed Jun  8 07:59:41 2011
@@ -3932,13 +3932,8 @@ public class JobTracker implements MRCon
     }
     
     synchronized (this) {
-      String queue = job.getProfile().getQueueName();
-      if (!(queueManager.getQueues().contains(queue))) {
-        job.fail();
-        throw new IOException("Queue \"" + queue + "\" does not exist");
-      }
-
       // check if queue is RUNNING
+      String queue = job.getProfile().getQueueName();
       if (!queueManager.isRunning(queue)) {
         throw new IOException("Queue \"" + queue + "\" is not running");
       }

Modified: hadoop/common/branches/branch-0.20-security-205/src/test/org/apache/hadoop/mapred/TestJobHistoryConfig.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-205/src/test/org/apache/hadoop/mapred/TestJobHistoryConfig.java?rev=1133274&r1=1133273&r2=1133274&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security-205/src/test/org/apache/hadoop/mapred/TestJobHistoryConfig.java
(original)
+++ hadoop/common/branches/branch-0.20-security-205/src/test/org/apache/hadoop/mapred/TestJobHistoryConfig.java
Wed Jun  8 07:59:41 2011
@@ -110,7 +110,7 @@ public class TestJobHistoryConfig extend
     conf.setSpeculativeExecution(false);
     conf.setJobName("test");
     conf.setUser("testuser");
-    conf.setQueueName("testQueue");
+    conf.setQueueName("default");
     String TEST_ROOT_DIR = new Path(System.getProperty("test.build.data",
         "/tmp")).toString().replace(' ', '+');
     JobTracker jt = JobTracker.startTracker(conf);



Mime
View raw message