hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From templ...@apache.org
Subject hadoop git commit: YARN-6481. Yarn top shows negative container number in FS (Contributed by Tao Jie via Daniel Templeton)
Date Tue, 02 May 2017 20:25:20 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 5e2831134 -> b337a1da3


YARN-6481. Yarn top shows negative container number in FS
(Contributed by Tao Jie via Daniel Templeton)

(cherry picked from commit 9f0aea0ee2c680afd26ef9da6ac662be00d8e24f)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/b337a1da
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/b337a1da
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/b337a1da

Branch: refs/heads/branch-2
Commit: b337a1da3104e773905ee942f35ff8c0c7cd969c
Parents: 5e28311
Author: Daniel Templeton <templedf@apache.org>
Authored: Tue May 2 13:04:40 2017 -0700
Committer: Daniel Templeton <templedf@apache.org>
Committed: Tue May 2 13:15:18 2017 -0700

----------------------------------------------------------------------
 .../resourcemanager/scheduler/fair/FSQueue.java      |  3 +++
 .../scheduler/fair/TestFairScheduler.java            | 15 +++++++++++++++
 2 files changed, 18 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/b337a1da/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSQueue.java
----------------------------------------------------------------------
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/fair/FSQueue.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSQueue.java
index acf4d5c..e131140 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSQueue.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSQueue.java
@@ -253,6 +253,9 @@ public abstract class FSQueue implements Queue, Schedulable {
     stats.setAllocatedVCores(getMetrics().getAllocatedVirtualCores());
     stats.setPendingVCores(getMetrics().getPendingVirtualCores());
     stats.setReservedVCores(getMetrics().getReservedVirtualCores());
+    stats.setAllocatedContainers(getMetrics().getAllocatedContainers());
+    stats.setPendingContainers(getMetrics().getPendingContainers());
+    stats.setReservedContainers(getMetrics().getReservedContainers());
     return stats;
   }
   

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b337a1da/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/TestFairScheduler.java
----------------------------------------------------------------------
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/fair/TestFairScheduler.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/TestFairScheduler.java
index 3bbb577..cc09b8c 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/TestFairScheduler.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/TestFairScheduler.java
@@ -875,6 +875,11 @@ public class TestFairScheduler extends FairSchedulerTestBase {
     QueueInfo queueInfo = scheduler.getQueueInfo("queueA", false, false);
     Assert.assertEquals(0.25f, queueInfo.getCapacity(), 0.0f);
     Assert.assertEquals(0.0f, queueInfo.getCurrentCapacity(), 0.0f);
+    // test queueMetrics
+    Assert.assertEquals(0, queueInfo.getQueueStatistics()
+        .getAllocatedContainers());
+    Assert.assertEquals(0, queueInfo.getQueueStatistics()
+        .getAllocatedMemoryMB());
     queueInfo = scheduler.getQueueInfo("queueB", false, false);
     Assert.assertEquals(0.75f, queueInfo.getCapacity(), 0.0f);
     Assert.assertEquals(0.0f, queueInfo.getCurrentCapacity(), 0.0f);
@@ -890,9 +895,19 @@ public class TestFairScheduler extends FairSchedulerTestBase {
     queueInfo = scheduler.getQueueInfo("queueA", false, false);
     Assert.assertEquals(0.25f, queueInfo.getCapacity(), 0.0f);
     Assert.assertEquals(0.5f, queueInfo.getCurrentCapacity(), 0.0f);
+    // test queueMetrics
+    Assert.assertEquals(1, queueInfo.getQueueStatistics()
+        .getAllocatedContainers());
+    Assert.assertEquals(1024, queueInfo.getQueueStatistics()
+        .getAllocatedMemoryMB());
     queueInfo = scheduler.getQueueInfo("queueB", false, false);
     Assert.assertEquals(0.75f, queueInfo.getCapacity(), 0.0f);
     Assert.assertEquals(1.0f, queueInfo.getCurrentCapacity(), 0.0f);
+    // test queueMetrics
+    Assert.assertEquals(1, queueInfo.getQueueStatistics()
+        .getAllocatedContainers());
+    Assert.assertEquals(6144, queueInfo.getQueueStatistics()
+        .getAllocatedMemoryMB());
   }
 
   @Test


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message