diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacityScheduler.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacityScheduler.java index 861dc432a87..cca4fe1872f 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacityScheduler.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacityScheduler.java @@ -2686,10 +2686,10 @@ public class CapacityScheduler extends } // Lets check for ACLs here. - if (!appPriorityACLManager.checkAccess(user, queuePath, appPriority)) { + if (!appPriorityACLManager.checkAccess(user, normalizeQueueName(queuePath), appPriority)) { throw new YarnException(new AccessControlException( - "User " + user + " does not have permission to submit/update " - + applicationId + " for " + appPriority)); + "User " + user + " does not have permission to submit/update " + + applicationId + " for " + appPriority)); } LOG.info("Priority '" + appPriority.getPriority() diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestApplicationPriorityACLs.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestApplicationPriorityACLs.java index b41ba836798..cf9a01045b9 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestApplicationPriorityACLs.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/TestApplicationPriorityACLs.java @@ -143,6 +143,7 @@ public class TestApplicationPriorityACLs extends ACLsTestBase { .newInstance(appSubmissionContext); try { submitterClient.submitApplication(submitRequest); + Assert.fail(); } catch (YarnException ex) { Assert.assertTrue(ex.getCause() instanceof RemoteException); }