You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by yh...@apache.org on 2009/03/12 17:03:45 UTC
svn commit: r752913 - in /hadoop/core/trunk: CHANGES.txt
src/mapred/org/apache/hadoop/mapred/JobTracker.java
src/test/org/apache/hadoop/mapred/TestQueueManager.java
Author: yhemanth
Date: Thu Mar 12 16:03:44 2009
New Revision: 752913
URL: http://svn.apache.org/viewvc?rev=752913&view=rev
Log:
HADOOP-5395. Change the exception message when a job is submitted to an invalid queue. Contributed by Rahul Kumar Singh.
Modified:
hadoop/core/trunk/CHANGES.txt
hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobTracker.java
hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestQueueManager.java
Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=752913&r1=752912&r2=752913&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Thu Mar 12 16:03:44 2009
@@ -979,6 +979,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
Modified: hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobTracker.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobTracker.java?rev=752913&r1=752912&r2=752913&view=diff
==============================================================================
--- hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobTracker.java (original)
+++ hadoop/core/trunk/src/mapred/org/apache/hadoop/mapred/JobTracker.java Thu Mar 12 16:03:44 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/trunk/src/test/org/apache/hadoop/mapred/TestQueueManager.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestQueueManager.java?rev=752913&r1=752912&r2=752913&view=diff
==============================================================================
--- hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestQueueManager.java (original)
+++ hadoop/core/trunk/src/test/org/apache/hadoop/mapred/TestQueueManager.java Thu Mar 12 16:03:44 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...