hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zjs...@apache.org
Subject git commit: YARN-2617. Fixed ApplicationSubmissionContext to still set resource for backward compatibility. Contributed by Wangda Tan.
Date Fri, 10 Oct 2014 01:01:40 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2.6 14080ea3d -> 647874206


YARN-2617. Fixed ApplicationSubmissionContext to still set resource for backward compatibility.
Contributed by Wangda Tan.

(cherry picked from commit e532ed8faa8db4b008a5b8d3f82b48a1b314fa6c)


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

Branch: refs/heads/branch-2.6
Commit: 647874206c683ade6ea43a390670913b7e0d6467
Parents: 14080ea
Author: Zhijie Shen <zjshen@apache.org>
Authored: Thu Oct 9 17:57:50 2014 -0700
Committer: Zhijie Shen <zjshen@apache.org>
Committed: Thu Oct 9 18:01:13 2014 -0700

----------------------------------------------------------------------
 hadoop-yarn-project/CHANGES.txt                               | 3 +++
 .../hadoop/yarn/api/records/ApplicationSubmissionContext.java | 1 +
 .../java/org/apache/hadoop/yarn/api/TestPBImplRecords.java    | 7 +++++++
 3 files changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/64787420/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index 18d08c7..a3961a4 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -548,6 +548,9 @@ Release 2.6.0 - UNRELEASED
     YARN-2598 GHS should show N/A instead of null for the inaccessible information
     (Zhijie Shen via mayank)
 
+    YARN-2617. Fixed ApplicationSubmissionContext to still set resource for
+    backward compatibility. (Wangda Tan via zjshen)
+
 Release 2.5.1 - 2014-09-05
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/64787420/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationSubmissionContext.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationSubmissionContext.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationSubmissionContext.java
index f186650..f1ebbfe 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationSubmissionContext.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationSubmissionContext.java
@@ -89,6 +89,7 @@ public abstract class ApplicationSubmissionContext {
     context.setApplicationType(applicationType);
     context.setKeepContainersAcrossApplicationAttempts(keepContainers);
     context.setNodeLabelExpression(appLabelExpression);
+    context.setResource(resource);
     
     ResourceRequest amReq = Records.newRecord(ResourceRequest.class);
     amReq.setResourceName(ResourceRequest.ANY);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/64787420/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/api/TestPBImplRecords.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/api/TestPBImplRecords.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/api/TestPBImplRecords.java
index 451d39b..b8f6e9c 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/api/TestPBImplRecords.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/api/TestPBImplRecords.java
@@ -45,6 +45,7 @@ import org.apache.hadoop.yarn.proto.YarnServerResourceManagerServiceProtos.*;
 import org.apache.hadoop.yarn.proto.YarnProtos.*;
 import org.apache.hadoop.yarn.proto.YarnServiceProtos.*;
 import org.apache.hadoop.yarn.server.api.protocolrecords.impl.pb.*;
+import org.apache.hadoop.yarn.util.resource.Resources;
 import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Ignore;
@@ -654,6 +655,12 @@ public class TestPBImplRecords {
   public void testApplicationSubmissionContextPBImpl() throws Exception {
     validatePBImplRecord(ApplicationSubmissionContextPBImpl.class,
         ApplicationSubmissionContextProto.class);
+    
+    ApplicationSubmissionContext ctx =
+        ApplicationSubmissionContext.newInstance(null, null, null, null, null,
+            false, false, 0, Resources.none(), null, false, null, null);
+    
+    Assert.assertNotNull(ctx.getResource());
   }
 
   @Test


Mime
View raw message