소스 검색

Merge -c 1529538 from trunk to branch-2.1-beta to fix YARN-1090. Fixed CS UI to better reflect applications as non-schedulable and not as pending. Contributed by Jian He.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2.1-beta@1529540 13f79535-47bb-0310-9956-ffa450edef68
Arun Murthy 11 년 전
부모
커밋
4b4597dbbd

+ 3 - 0
hadoop-yarn-project/CHANGES.txt

@@ -115,6 +115,9 @@ Release 2.1.2 - UNRELEASED
 
     YARN-1032. Fixed NPE in RackResolver. (Lohit Vijayarenu via acmurthy)
 
+    YARN-1090. Fixed CS UI to better reflect applications as non-schedulable
+    and not as pending. (Jian He via acmurthy)
+
 Release 2.1.1-beta - 2013-09-23
 
   INCOMPATIBLE CHANGES

+ 1 - 1
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/QueueMetrics.java

@@ -73,7 +73,7 @@ public class QueueMetrics implements MetricsSource {
   @Metric("Reserved CPU in virtual cores") MutableGaugeInt reservedVCores;
   @Metric("# of reserved containers") MutableGaugeInt reservedContainers;
   @Metric("# of active users") MutableGaugeInt activeUsers;
-  @Metric("# of active users") MutableGaugeInt activeApplications;
+  @Metric("# of active applications") MutableGaugeInt activeApplications;
   private final MutableGaugeInt[] runningTime;
   private TimeBucketMetrics<ApplicationId> runBuckets;
 

+ 7 - 6
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/CapacitySchedulerPage.java

@@ -98,24 +98,25 @@ class CapacitySchedulerPage extends RmView {
       for (UserInfo entry: users) {
         activeUserList.append(entry.getUsername()).append(" &lt;")
           .append(getPercentage(entry.getResourcesUsed(), usedResources))
-          .append(", Active Apps: " + entry.getNumActiveApplications())
-          .append(", Pending Apps: " + entry.getNumPendingApplications())
+          .append(", Schedulable Apps: " + entry.getNumActiveApplications())
+          .append(", Non-Schedulable Apps: " + entry.getNumPendingApplications())
           .append("&gt;<br style='display:block'>"); //Force line break
       }
 
       ResponseInfo ri = info("\'" + lqinfo.getQueuePath().substring(5) + "\' Queue Status").
           _("Queue State:", lqinfo.getQueueState()).
           _("Used Capacity:", percent(lqinfo.getUsedCapacity() / 100)).
+          _("Absolute Used Capacity:", percent(lqinfo.getAbsoluteUsedCapacity() / 100)).
           _("Absolute Capacity:", percent(lqinfo.getAbsoluteCapacity() / 100)).
           _("Absolute Max Capacity:", percent(lqinfo.getAbsoluteMaxCapacity() / 100)).
           _("Used Resources:", StringEscapeUtils.escapeHtml(lqinfo.getUsedResources().toString())).
-          _("Num Active Applications:", Integer.toString(lqinfo.getNumActiveApplications())).
-          _("Num Pending Applications:", Integer.toString(lqinfo.getNumPendingApplications())).
+          _("Num Schedulable Applications:", Integer.toString(lqinfo.getNumActiveApplications())).
+          _("Num Non-Schedulable Applications:", Integer.toString(lqinfo.getNumPendingApplications())).
           _("Num Containers:", Integer.toString(lqinfo.getNumContainers())).
           _("Max Applications:", Integer.toString(lqinfo.getMaxApplications())).
           _("Max Applications Per User:", Integer.toString(lqinfo.getMaxApplicationsPerUser())).
-          _("Max Active Applications:", Integer.toString(lqinfo.getMaxActiveApplications())).
-          _("Max Active Applications Per User:", Integer.toString(lqinfo.getMaxActiveApplicationsPerUser())).
+          _("Max Schedulable Applications:", Integer.toString(lqinfo.getMaxActiveApplications())).
+          _("Max Schedulable Applications Per User:", Integer.toString(lqinfo.getMaxActiveApplicationsPerUser())).
           _("Configured Capacity:", percent(lqinfo.getCapacity() / 100)).
           _("Configured Max Capacity:", percent(lqinfo.getMaxCapacity() / 100)).
           _("Configured Minimum User Limit Percent:", Integer.toString(lqinfo.getUserLimit()) + "%").