hadoop-yarn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jia...@apache.org
Subject svn commit: r1594086 - in /hadoop/common/branches/branch-2/hadoop-yarn-project: ./ hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/ hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/api/
Date Mon, 12 May 2014 20:48:24 GMT
Author: jianhe
Date: Mon May 12 20:48:23 2014
New Revision: 1594086

URL: http://svn.apache.org/r1594086
Log:
Merge r1594085 from trunk. YARN-2016. Fix a bug in GetApplicationsRequestPBImpl to add the
missed fields to proto. Contributed by Junping Du

Added:
    hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/api/TestGetApplicationsRequest.java
      - copied unchanged from r1594085, hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/api/TestGetApplicationsRequest.java
Modified:
    hadoop/common/branches/branch-2/hadoop-yarn-project/CHANGES.txt
    hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/GetApplicationsRequestPBImpl.java

Modified: hadoop/common/branches/branch-2/hadoop-yarn-project/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-yarn-project/CHANGES.txt?rev=1594086&r1=1594085&r2=1594086&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-yarn-project/CHANGES.txt (original)
+++ hadoop/common/branches/branch-2/hadoop-yarn-project/CHANGES.txt Mon May 12 20:48:23 2014
@@ -90,6 +90,9 @@ Release 2.5.0 - UNRELEASED
     YARN-1975. Fix yarn application CLI to print the scheme of the tracking url
     of failed/killed applications. (Junping Du via jianhe)
 
+    YARN-2016. Fix a bug in GetApplicationsRequestPBImpl to add the missed fields
+    to proto. (Junping Du via jianhe)
+
 Release 2.4.1 - UNRELEASED
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/GetApplicationsRequestPBImpl.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/GetApplicationsRequestPBImpl.java?rev=1594086&r1=1594085&r2=1594086&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/GetApplicationsRequestPBImpl.java
(original)
+++ hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/GetApplicationsRequestPBImpl.java
Mon May 12 20:48:23 2014
@@ -121,6 +121,25 @@ public class GetApplicationsRequestPBImp
     if (this.scope != null) {
       builder.setScope(ProtoUtils.convertToProtoFormat(scope));
     }
+    if (this.start != null) {
+      builder.setStartBegin(start.getMinimumLong());
+      builder.setStartEnd(start.getMaximumLong());
+    }
+    
+    if (this.finish != null) {
+      builder.setFinishBegin(start.getMinimumLong());
+      builder.setFinishEnd(start.getMaximumLong());
+    }
+    
+    builder.setLimit(limit);
+    
+    if (this.users != null && !this.users.isEmpty()) {
+      builder.addAllUsers(this.users);
+    }
+    
+    if (this.queues != null && !this.queues.isEmpty()) {
+      builder.addAllQueues(this.queues);
+    }
   }
 
   private void addLocalApplicationTypesToProto() {
@@ -326,7 +345,7 @@ public class GetApplicationsRequestPBImp
   public LongRange getStartRange() {
     if (this.start == null) {
       GetApplicationsRequestProtoOrBuilder p = viaProto ? proto: builder;
-      if (p.hasStartBegin() || p.hasFinishBegin()) {
+      if (p.hasStartBegin() || p.hasStartEnd()) {
         long begin = p.hasStartBegin() ? p.getStartBegin() : 0L;
         long end = p.hasStartEnd() ? p.getStartEnd() : Long.MAX_VALUE;
         this.start = new LongRange(begin, end);



Mime
View raw message