Sfoglia il codice sorgente

Reverting 1512475 (labeled as YARN-656). Accidentally committed two patches together

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1512478 13f79535-47bb-0310-9956-ffa450edef68
Sanford Ryza 12 anni fa
parent
commit
796ed241bb

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

@@ -797,9 +797,6 @@ Release 2.1.0-beta - 2013-08-06
     YARN-945. Removed setting of AMRMToken's service from ResourceManager
     YARN-945. Removed setting of AMRMToken's service from ResourceManager
     and changed client libraries do it all the time and correctly. (vinodkv)
     and changed client libraries do it all the time and correctly. (vinodkv)
 
 
-    YARN-656. In scheduler UI, including reserved memory in Memory Total can 
-    make it exceed cluster capacity. (Sandy Ryza)
-
   BREAKDOWN OF HADOOP-8562/YARN-191 SUBTASKS AND RELATED JIRAS
   BREAKDOWN OF HADOOP-8562/YARN-191 SUBTASKS AND RELATED JIRAS
 
 
     YARN-158. Yarn creating package-info.java must not depend on sh.
     YARN-158. Yarn creating package-info.java must not depend on sh.

+ 0 - 8
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java

@@ -711,14 +711,6 @@ public class YarnConfiguration extends Configuration {
    */
    */
   public static boolean DEFAULT_YARN_MINICLUSTER_FIXED_PORTS = false;
   public static boolean DEFAULT_YARN_MINICLUSTER_FIXED_PORTS = false;
 
 
-  /**
-   * Whether users are explicitly trying to control resource monitoring
-   * configuration for the MiniYARNCluster. Disabled by default.
-   */
-  public static final String YARN_MINICLUSTER_CONTROL_RESOURCE_MONITORING =
-      YARN_PREFIX + "minicluster.control-resource-monitoring";
-  public static final boolean
-      DEFAULT_YARN_MINICLUSTER_CONTROL_RESOURCE_MONITORING = false;
 
 
   /** The log directory for the containers */
   /** The log directory for the containers */
   public static final String YARN_APP_CONTAINER_LOG_DIR =
   public static final String YARN_APP_CONTAINER_LOG_DIR =

+ 1 - 1
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/ClusterMetricsInfo.java

@@ -77,7 +77,7 @@ public class ClusterMetricsInfo {
     this.containersPending = metrics.getPendingContainers();
     this.containersPending = metrics.getPendingContainers();
     this.containersReserved = metrics.getReservedContainers();
     this.containersReserved = metrics.getReservedContainers();
     
     
-    this.totalMB = availableMB + allocatedMB;
+    this.totalMB = availableMB + reservedMB + allocatedMB;
     this.activeNodes = clusterMetrics.getNumActiveNMs();
     this.activeNodes = clusterMetrics.getNumActiveNMs();
     this.lostNodes = clusterMetrics.getNumLostNMs();
     this.lostNodes = clusterMetrics.getNumLostNMs();
     this.unhealthyNodes = clusterMetrics.getUnhealthyNMs();
     this.unhealthyNodes = clusterMetrics.getUnhealthyNMs();

+ 2 - 1
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/TestRMWebServices.java

@@ -408,7 +408,8 @@ public class TestRMWebServices extends JerseyTest {
     ClusterMetrics clusterMetrics = ClusterMetrics.getMetrics();
     ClusterMetrics clusterMetrics = ClusterMetrics.getMetrics();
 
 
     long totalMBExpect = 
     long totalMBExpect = 
-        metrics.getAvailableMB() + metrics.getAllocatedMB();
+        metrics.getReservedMB()+ metrics.getAvailableMB() 
+        + metrics.getAllocatedMB();
 
 
     assertEquals("appsSubmitted doesn't match", 
     assertEquals("appsSubmitted doesn't match", 
         metrics.getAppsSubmitted(), submittedApps);
         metrics.getAppsSubmitted(), submittedApps);

+ 0 - 10
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-tests/src/test/java/org/apache/hadoop/yarn/server/MiniYARNCluster.java

@@ -304,16 +304,6 @@ public class MiniYARNCluster extends CompositeService {
                         MiniYARNCluster.getHostname() + ":0");
                         MiniYARNCluster.getHostname() + ":0");
         getConfig().set(YarnConfiguration.NM_WEBAPP_ADDRESS,
         getConfig().set(YarnConfiguration.NM_WEBAPP_ADDRESS,
                         MiniYARNCluster.getHostname() + ":0");
                         MiniYARNCluster.getHostname() + ":0");
-
-        // Disable resource checks by default
-        if (!getConfig().getBoolean(
-            YarnConfiguration.YARN_MINICLUSTER_CONTROL_RESOURCE_MONITORING,
-            YarnConfiguration.
-                DEFAULT_YARN_MINICLUSTER_CONTROL_RESOURCE_MONITORING)) {
-          getConfig().setBoolean(YarnConfiguration.NM_PMEM_CHECK_ENABLED, false);
-          getConfig().setBoolean(YarnConfiguration.NM_VMEM_CHECK_ENABLED, false);
-        }
-
         LOG.info("Starting NM: " + index);
         LOG.info("Starting NM: " + index);
         nodeManagers[index].init(getConfig());
         nodeManagers[index].init(getConfig());
         new Thread() {
         new Thread() {