hadoop-yarn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acmur...@apache.org
Subject svn commit: r1493509 - in /hadoop/common/trunk/hadoop-yarn-project: ./ hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/ hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/ h...
Date Sun, 16 Jun 2013 13:59:42 GMT
Author: acmurthy
Date: Sun Jun 16 13:59:41 2013
New Revision: 1493509

URL: http://svn.apache.org/r1493509
Log:
YARN-787. Removed minimum resource from RegisterApplicationMasterResponse. Contributed by
Alejandro Abdelnur.

Modified:
    hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
    hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/RegisterApplicationMasterResponse.java
    hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/RegisterApplicationMasterResponsePBImpl.java
    hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/proto/yarn_service_protos.proto
    hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/main/java/org/apache/hadoop/yarn/applications/distributedshell/ApplicationMaster.java
    hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/ClusterInfo.java
    hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ApplicationMasterService.java

Modified: hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt?rev=1493509&r1=1493508&r2=1493509&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt (original)
+++ hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt Sun Jun 16 13:59:41 2013
@@ -149,6 +149,9 @@ Release 2.1.0-beta - UNRELEASED
     YARN-821. Renamed setFinishApplicationStatus to setFinalApplicationStatus in
     FinishApplicationMasterRequest for consistency. (Jian He via vinodk)
 
+    YARN-787. Removed minimum resource from RegisterApplicationMasterResponse.
+    (tucu via acmurthy)
+
   NEW FEATURES
 
     YARN-482. FS: Extend SchedulingMode to intermediate queues. 

Modified: hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/RegisterApplicationMasterResponse.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/RegisterApplicationMasterResponse.java?rev=1493509&r1=1493508&r2=1493509&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/RegisterApplicationMasterResponse.java
(original)
+++ hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/RegisterApplicationMasterResponse.java
Sun Jun 16 13:59:41 2013
@@ -51,24 +51,10 @@ public abstract class RegisterApplicatio
       Map<ApplicationAccessType, String> acls) {
     RegisterApplicationMasterResponse response =
         Records.newRecord(RegisterApplicationMasterResponse.class);
-    response.setMinimumResourceCapability(minCapability);
     response.setMaximumResourceCapability(maxCapability);
     response.setApplicationACLs(acls);
     return response;
   }
-
-  /**
-   * Get the minimum capability for any {@link Resource} allocated by the 
-   * <code>ResourceManager</code> in the cluster.
-   * @return minimum capability of allocated resources in the cluster
-   */
-  @Public
-  @Stable
-  public abstract Resource getMinimumResourceCapability();
-  
-  @Private
-  @Unstable
-  public abstract void setMinimumResourceCapability(Resource capability);
   
   /**
    * Get the maximum capability for any {@link Resource} allocated by the 

Modified: hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/RegisterApplicationMasterResponsePBImpl.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/RegisterApplicationMasterResponsePBImpl.java?rev=1493509&r1=1493508&r2=1493509&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/RegisterApplicationMasterResponsePBImpl.java
(original)
+++ hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/RegisterApplicationMasterResponsePBImpl.java
Sun Jun 16 13:59:41 2013
@@ -42,7 +42,6 @@ public class RegisterApplicationMasterRe
   RegisterApplicationMasterResponseProto.Builder builder = null;
   boolean viaProto = false;
 
-  private Resource minimumResourceCapability;
   private Resource maximumResourceCapability;
   private Map<ApplicationAccessType, String> applicationACLS = null;
 
@@ -91,10 +90,6 @@ public class RegisterApplicationMasterRe
   }
 
   private void mergeLocalToBuilder() {
-    if (this.minimumResourceCapability != null) {
-      builder.setMinimumCapability(
-          convertToProtoFormat(this.minimumResourceCapability));
-    }
     if (this.maximumResourceCapability != null) {
       builder.setMaximumCapability(
           convertToProtoFormat(this.maximumResourceCapability));
@@ -128,21 +123,6 @@ public class RegisterApplicationMasterRe
   }
 
   @Override
-  public Resource getMinimumResourceCapability() {
-    if (this.minimumResourceCapability != null) {
-      return this.minimumResourceCapability;
-    }
-
-    RegisterApplicationMasterResponseProtoOrBuilder p = viaProto ? proto : builder;
-    if (!p.hasMinimumCapability()) {
-      return null;
-    }
-
-    this.minimumResourceCapability = convertFromProtoFormat(p.getMinimumCapability());
-    return this.minimumResourceCapability;
-  }
-
-  @Override
   public void setMaximumResourceCapability(Resource capability) {
     maybeInitBuilder();
     if(maximumResourceCapability == null) {
@@ -152,16 +132,6 @@ public class RegisterApplicationMasterRe
   }
 
   @Override
-  public void setMinimumResourceCapability(Resource capability) {
-    maybeInitBuilder();
-    if(minimumResourceCapability == null) {
-      builder.clearMinimumCapability();
-    }
-    this.minimumResourceCapability = capability;
-  }
-
-
-  @Override
   public Map<ApplicationAccessType, String> getApplicationACLs() {
     initApplicationACLs();
     return this.applicationACLS;

Modified: hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/proto/yarn_service_protos.proto
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/proto/yarn_service_protos.proto?rev=1493509&r1=1493508&r2=1493509&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/proto/yarn_service_protos.proto
(original)
+++ hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/proto/yarn_service_protos.proto
Sun Jun 16 13:59:41 2013
@@ -35,9 +35,8 @@ message RegisterApplicationMasterRequest
 }
 
 message RegisterApplicationMasterResponseProto {
-  optional ResourceProto minimumCapability = 1;
-  optional ResourceProto maximumCapability = 2;
-  repeated ApplicationACLMapProto application_ACLs = 3;
+  optional ResourceProto maximumCapability = 1;
+  repeated ApplicationACLMapProto application_ACLs = 2;
 }
 
 message FinishApplicationMasterRequestProto {

Modified: hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/main/java/org/apache/hadoop/yarn/applications/distributedshell/ApplicationMaster.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/main/java/org/apache/hadoop/yarn/applications/distributedshell/ApplicationMaster.java?rev=1493509&r1=1493508&r2=1493509&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/main/java/org/apache/hadoop/yarn/applications/distributedshell/ApplicationMaster.java
(original)
+++ hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/main/java/org/apache/hadoop/yarn/applications/distributedshell/ApplicationMaster.java
Sun Jun 16 13:59:41 2013
@@ -463,22 +463,11 @@ public class ApplicationMaster {
             appMasterTrackingUrl);
     // Dump out information about cluster capability as seen by the
     // resource manager
-    int minMem = response.getMinimumResourceCapability().getMemory();
     int maxMem = response.getMaximumResourceCapability().getMemory();
-    LOG.info("Min mem capabililty of resources in this cluster " + minMem);
     LOG.info("Max mem capabililty of resources in this cluster " + maxMem);
 
-    // A resource ask has to be atleast the minimum of the capability of the
-    // cluster, the value has to be a multiple of the min value and cannot
-    // exceed the max.
-    // If it is not an exact multiple of min, the RM will allocate to the
-    // nearest multiple of min
-    if (containerMemory < minMem) {
-      LOG.info("Container memory specified below min threshold of cluster."
-          + " Using min value." + ", specified=" + containerMemory + ", min="
-          + minMem);
-      containerMemory = minMem;
-    } else if (containerMemory > maxMem) {
+    // A resource ask cannot exceed the max.
+    if (containerMemory > maxMem) {
       LOG.info("Container memory specified above max threshold of cluster."
           + " Using max value." + ", specified=" + containerMemory + ", max="
           + maxMem);

Modified: hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/ClusterInfo.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/ClusterInfo.java?rev=1493509&r1=1493508&r2=1493509&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/ClusterInfo.java
(original)
+++ hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/ClusterInfo.java
Sun Jun 16 13:59:41 2013
@@ -22,27 +22,16 @@ import org.apache.hadoop.yarn.api.record
 import org.apache.hadoop.yarn.util.Records;
 
 public class ClusterInfo {
-  private Resource minContainerCapability;
   private Resource maxContainerCapability;
 
   public ClusterInfo() {
-    this.minContainerCapability = Records.newRecord(Resource.class);
     this.maxContainerCapability = Records.newRecord(Resource.class);
   }
 
-  public ClusterInfo(Resource minCapability, Resource maxCapability) {
-    this.minContainerCapability = minCapability;
+  public ClusterInfo(Resource maxCapability) {
     this.maxContainerCapability = maxCapability;
   }
 
-  public Resource getMinContainerCapability() {
-    return minContainerCapability;
-  }
-
-  public void setMinContainerCapability(Resource minContainerCapability) {
-    this.minContainerCapability = minContainerCapability;
-  }
-
   public Resource getMaxContainerCapability() {
     return maxContainerCapability;
   }

Modified: hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ApplicationMasterService.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ApplicationMasterService.java?rev=1493509&r1=1493508&r2=1493509&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ApplicationMasterService.java
(original)
+++ hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ApplicationMasterService.java
Sun Jun 16 13:59:41 2013
@@ -210,8 +210,6 @@ public class ApplicationMasterService ex
       // Pick up min/max resource from scheduler...
       RegisterApplicationMasterResponse response = recordFactory
           .newRecordInstance(RegisterApplicationMasterResponse.class);
-      response.setMinimumResourceCapability(rScheduler
-          .getMinimumResourceCapability());
       response.setMaximumResourceCapability(rScheduler
           .getMaximumResourceCapability());
       response.setApplicationACLs(app.getRMAppAttempt(applicationAttemptId)



Mime
View raw message