hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jia...@apache.org
Subject hadoop git commit: YARN-6756. ContainerRequest#executionTypeRequest causes NPE. Contributed by Jian He
Date Wed, 30 Aug 2017 03:36:28 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 9bcd64d23 -> 036cbd745


YARN-6756. ContainerRequest#executionTypeRequest causes NPE. Contributed by Jian He


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

Branch: refs/heads/branch-2
Commit: 036cbd745313598a8867d7fff11d110c90c2961a
Parents: 9bcd64d
Author: Jian He <jianhe@apache.org>
Authored: Tue Aug 29 20:35:53 2017 -0700
Committer: Jian He <jianhe@apache.org>
Committed: Tue Aug 29 20:36:23 2017 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/yarn/client/api/AMRMClient.java     | 5 +++--
 .../yarn/client/api/impl/TestAMRMClientContainerRequest.java   | 6 ++++--
 2 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/036cbd74/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/AMRMClient.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/AMRMClient.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/AMRMClient.java
index bc4173f..1c3ac1c 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/AMRMClient.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/AMRMClient.java
@@ -111,9 +111,10 @@ public abstract class AMRMClient<T extends AMRMClient.ContainerRequest>
extends
     private List<String> racks;
     private Priority priority;
     private long allocationRequestId;
-    private boolean relaxLocality;
+    private boolean relaxLocality = true;
     private String nodeLabelsExpression;
-    private ExecutionTypeRequest executionTypeRequest;
+    private ExecutionTypeRequest executionTypeRequest =
+        ExecutionTypeRequest.newInstance();
     
     /**
      * Instantiates a {@link ContainerRequest} with the given constraints and

http://git-wip-us.apache.org/repos/asf/hadoop/blob/036cbd74/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/api/impl/TestAMRMClientContainerRequest.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/api/impl/TestAMRMClientContainerRequest.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/api/impl/TestAMRMClientContainerRequest.java
index ad18da3..9603539 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/api/impl/TestAMRMClientContainerRequest.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/api/impl/TestAMRMClientContainerRequest.java
@@ -51,8 +51,10 @@ public class TestAMRMClientContainerRequest {
 
     Resource capability = Resource.newInstance(1024, 1);
     ContainerRequest request =
-        new ContainerRequest(capability, new String[] {"host1", "host2"},
-            new String[] {"/rack2"}, Priority.newInstance(1));
+        ContainerRequest.newBuilder().capability(capability)
+            .nodes(new String[] { "host1", "host2" })
+            .racks(new String[] { "/rack2" }).priority(Priority.newInstance(1))
+            .build();
     client.addContainerRequest(request);
     verifyResourceRequest(client, request, "host1", true);
     verifyResourceRequest(client, request, "host2", true);


---------------------------------------------------------------------
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