hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yhema...@apache.org
Subject svn commit: r752914 - in /hadoop/core/branches/branch-0.20: ./ CHANGES.txt src/mapred/org/apache/hadoop/mapred/JobTracker.java src/test/org/apache/hadoop/mapred/TestQueueManager.java
Date Thu, 12 Mar 2009 16:08:47 GMT
Author: yhemanth
Date: Thu Mar 12 16:08:45 2009
New Revision: 752914

URL: http://svn.apache.org/viewvc?rev=752914&view=rev
Log:
Merge -r 752912:752913 from trunk to branch 0.20 to fix HADOOP-5395.

Modified:
    hadoop/core/branches/branch-0.20/   (props changed)
    hadoop/core/branches/branch-0.20/CHANGES.txt   (contents, props changed)
    hadoop/core/branches/branch-0.20/src/mapred/org/apache/hadoop/mapred/JobTracker.java
    hadoop/core/branches/branch-0.20/src/test/org/apache/hadoop/mapred/TestQueueManager.java

Propchange: hadoop/core/branches/branch-0.20/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Mar 12 16:08:45 2009
@@ -1,2 +1,2 @@
 /hadoop/core/branches/branch-0.19:713112
-/hadoop/core/trunk:727001,727117,727191,727212,727217,727228,727255,727869,728187,729052,729987,732385,732572,732613,732777,732838,732869,733887,734870,734916,736426,738328,738697,740077,740157,741703,741762,743745,743816,743892,744894,745180,746010,746206,746227,746233,746274,746902-746903,746944,746968,746970,747279,747289,747802,748084,748090,748783,749262,749318,749863,750533,752073,752609,752834,752836
+/hadoop/core/trunk:727001,727117,727191,727212,727217,727228,727255,727869,728187,729052,729987,732385,732572,732613,732777,732838,732869,733887,734870,734916,736426,738328,738697,740077,740157,741703,741762,743745,743816,743892,744894,745180,746010,746206,746227,746233,746274,746902-746903,746944,746968,746970,747279,747289,747802,748084,748090,748783,749262,749318,749863,750533,752073,752609,752834,752836,752913

Modified: hadoop/core/branches/branch-0.20/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.20/CHANGES.txt?rev=752914&r1=752913&r2=752914&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.20/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.20/CHANGES.txt Thu Mar 12 16:08:45 2009
@@ -697,6 +697,9 @@
     ACL check failures and also check ACLs on restart.
     (Amar Kamat via yhemanth)
 
+    HADOOP-5395. Change the exception message when a job is submitted to an
+    invalid queue. (Rahul Kumar Singh via yhemanth)
+
 Release 0.19.2 - Unreleased
 
   BUG FIXES

Propchange: hadoop/core/branches/branch-0.20/CHANGES.txt
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Mar 12 16:08:45 2009
@@ -1,3 +1,3 @@
 /hadoop/core/branches/branch-0.18/CHANGES.txt:727226
 /hadoop/core/branches/branch-0.19/CHANGES.txt:713112
-/hadoop/core/trunk/CHANGES.txt:727001,727117,727191,727212,727228,727255,727869,728187,729052,729987,732385,732572,732613,732777,732838,732869,733887,734870,734916,735082,736426,738602,738697,739416,740077,740157,741703,741762,743296,743745,743816,743892,744894,745180,745268,746010,746193,746206,746227,746233,746274,746902-746903,746944,746968,746970,747279,747289,747802,748084,748090,748783,749262,749318,749863,750533,752073,752514,752555,752590,752609,752834,752836
+/hadoop/core/trunk/CHANGES.txt:727001,727117,727191,727212,727228,727255,727869,728187,729052,729987,732385,732572,732613,732777,732838,732869,733887,734870,734916,735082,736426,738602,738697,739416,740077,740157,741703,741762,743296,743745,743816,743892,744894,745180,745268,746010,746193,746206,746227,746233,746274,746902-746903,746944,746968,746970,747279,747289,747802,748084,748090,748783,749262,749318,749863,750533,752073,752514,752555,752590,752609,752834,752836,752913

Modified: hadoop/core/branches/branch-0.20/src/mapred/org/apache/hadoop/mapred/JobTracker.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.20/src/mapred/org/apache/hadoop/mapred/JobTracker.java?rev=752914&r1=752913&r2=752914&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.20/src/mapred/org/apache/hadoop/mapred/JobTracker.java (original)
+++ hadoop/core/branches/branch-0.20/src/mapred/org/apache/hadoop/mapred/JobTracker.java Thu
Mar 12 16:08:45 2009
@@ -2775,6 +2775,12 @@
     }
     
     JobInProgress job = new JobInProgress(jobId, this, this.conf);
+    
+    String queue = job.getProfile().getQueueName();
+    if(!(queueManager.getQueues().contains(queue))) {      
+      new CleanupQueue().addToQueue(conf,getSystemDirectoryForJob(jobId));
+      throw new IOException("Queue \"" + queue + "\" does not exist");        
+    }
 
     // check for access
     try {

Modified: hadoop/core/branches/branch-0.20/src/test/org/apache/hadoop/mapred/TestQueueManager.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.20/src/test/org/apache/hadoop/mapred/TestQueueManager.java?rev=752914&r1=752913&r2=752914&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.20/src/test/org/apache/hadoop/mapred/TestQueueManager.java
(original)
+++ hadoop/core/branches/branch-0.20/src/test/org/apache/hadoop/mapred/TestQueueManager.java
Thu Mar 12 16:08:45 2009
@@ -101,6 +101,22 @@
     verifyJobSubmission(conf, false, "q1");
   }
   
+  public void testSubmissionToInvalidQueue() throws IOException{
+    JobConf conf = new JobConf();
+    conf.set("mapred.queue.names","default");
+    setUpCluster(conf);
+    String queueName = "q1";
+    try {
+      RunningJob rjob = submitSleepJob(1, 1, 100, 100, true, null, queueName);
+    } catch (IOException ioe) {      
+       assertTrue(ioe.getMessage().contains("Queue \"" + queueName + "\" does not exist"));
+       return;
+    } finally {
+      tearDownCluster();
+    }
+    fail("Job submission to invalid queue job shouldnot complete , it should fail with proper
exception ");   
+  }
+  
   public void testEnabledACLForNonDefaultQueue() throws IOException,
                                                           LoginException {
     // login as self...



Mime
View raw message