Ver código fonte

MAPREDUCE-2706. Log job submission failures. Contributed by Jeffrey Naisbitt.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/MR-279@1156402 13f79535-47bb-0310-9956-ffa450edef68
Arun Murthy 14 anos atrás
pai
commit
b0e9441610

+ 3 - 0
mapreduce/CHANGES.txt

@@ -4,6 +4,9 @@ Trunk (unreleased changes)
 
   MAPREDUCE-279
 
+    MAPREDUCE-2706. Log job submission failures. (Jeffrey Naisbitt via
+    acmurthy) 
+    
     MAPREDUCE-2782. Unit tests for CapacityScheduler. (acmurthy) 
     
     Fix for running ant targets to use the right set of common/test jars 

+ 18 - 12
mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/LeafQueue.java

@@ -414,27 +414,33 @@ public class LeafQueue implements Queue {
 
       // Check if the queue is accepting jobs
       if (state != QueueState.RUNNING) {
-        throw new AccessControlException("Queue " + getQueuePath() +
-            " is STOPPED. Cannot accept submission of application: " +
-            application.getApplicationId());
+        String msg = "Queue " + getQueuePath() +
+        " is STOPPED. Cannot accept submission of application: " +
+        application.getApplicationId();
+        LOG.info(msg);
+        throw new AccessControlException(msg);
       }
 
       // Check submission limits for queues
       if (getNumApplications() >= maxApplications) {
-        throw new AccessControlException("Queue " + getQueuePath() + 
-            " already has " + getNumApplications() + " applications," +
-            " cannot accept submission of application: " + 
-            application.getApplicationId());
+        String msg = "Queue " + getQueuePath() + 
+        " already has " + getNumApplications() + " applications," +
+        " cannot accept submission of application: " + 
+        application.getApplicationId();
+        LOG.info(msg);
+        throw new AccessControlException(msg);
       }
 
       // Check submission limits for the user on this queue
       user = getUser(userName);
       if (user.getApplications() >= maxApplicationsPerUser) {
-        throw new AccessControlException("Queue " + getQueuePath() + 
-            " already has " + user.getApplications() + 
-            " applications from user " + userName + 
-            " cannot accept submission of application: " + 
-            application.getApplicationId());
+        String msg = "Queue " + getQueuePath() + 
+        " already has " + user.getApplications() + 
+        " applications from user " + userName + 
+        " cannot accept submission of application: " + 
+        application.getApplicationId();
+        LOG.info(msg);
+        throw new AccessControlException(msg);
       }
 
       // Add the application to our data-structures