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 cd...@apache.org on 2011/04/01 04:15:07 UTC

svn commit: r1087554 - in /hadoop/common/branches/branch-0.20-security: CHANGES.txt src/mapred/org/apache/hadoop/mapred/QueueManager.java

Author: cdouglas
Date: Fri Apr  1 02:15:07 2011
New Revision: 1087554

URL: http://svn.apache.org/viewvc?rev=1087554&view=rev
Log:
MAPREDUCE-2411. Force an exception when the queue has an invalid name or
its ACLs are misconfigured. Contributed by Dick King

Modified:
    hadoop/common/branches/branch-0.20-security/CHANGES.txt
    hadoop/common/branches/branch-0.20-security/src/mapred/org/apache/hadoop/mapred/QueueManager.java

Modified: hadoop/common/branches/branch-0.20-security/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security/CHANGES.txt?rev=1087554&r1=1087553&r2=1087554&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security/CHANGES.txt (original)
+++ hadoop/common/branches/branch-0.20-security/CHANGES.txt Fri Apr  1 02:15:07 2011
@@ -22,9 +22,12 @@ Release 0.20.204.0 - unreleased
     MAPREDUCE-2409. Distinguish distributed cache artifacts localized as
     files, archives. (Siddharth Seth via cdouglas)
 
-    MAPREDUCE-118 Fix Job.getJobID() to get the new ID as soon as it's 
+    MAPREDUCE-118. Fix Job.getJobID() to get the new ID as soon as it's 
     assigned. (Amareshwari Sriramadasu and Dick King via cdouglas)
 
+    MAPREDUCE-2411. Force an exception when the queue has an invalid name or
+    its ACLs are misconfigured. (Dick King via cdouglas)
+
   IMPROVEMENTS
 
     HDFS-1541. Not marking datanodes dead when namenode in safemode.

Modified: hadoop/common/branches/branch-0.20-security/src/mapred/org/apache/hadoop/mapred/QueueManager.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security/src/mapred/org/apache/hadoop/mapred/QueueManager.java?rev=1087554&r1=1087553&r2=1087554&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20-security/src/mapred/org/apache/hadoop/mapred/QueueManager.java (original)
+++ hadoop/common/branches/branch-0.20-security/src/mapred/org/apache/hadoop/mapred/QueueManager.java Fri Apr  1 02:15:07 2011
@@ -380,14 +380,15 @@ class QueueManager {
   synchronized AccessControlList getQueueACL(String queueName, QueueACL qACL) {
     if (aclsEnabled) {
       Queue q = queues.get(queueName);
-      assert q != null : "There is no queue named " + queueName;
+      if (q == null) {
+        throw new IllegalArgumentException(
+            "There is no queue named " + queueName);
+      }
       Map<String, AccessControlList> acls = q.getAcls();
-      assert acls != null
-        : ( "The queue named "
-            + queueName
-            + " does not have any access control lists.  "
-            + "An error log message should have shown up "
-            + "in the cluster initialization logs.");
+      if (acls == null) {
+        throw new IllegalArgumentException("The queue named " + queueName +
+            " is misconfigured: its access control lists are undefined.");
+      }
       return acls.get(toFullPropertyName(queueName, qACL.getAclName()));
     }
     return new AccessControlList("*");