From 29dd55153e37471d9c177f4bd173f1d02bc96410 Mon Sep 17 00:00:00 2001 From: Arun Suresh Date: Mon, 18 Sep 2017 11:26:44 -0700 Subject: [PATCH] YARN-7199. Fix TestAMRMClientContainerRequest.testOpportunisticAndGuaranteedRequests. (Botong Huang via asuresh) --- .../org/apache/hadoop/yarn/client/api/AMRMClient.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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 815915efd8..e86bd12cfc 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 @@ -118,8 +118,8 @@ public static class ContainerRequest { private String nodeLabelsExpression; private ExecutionTypeRequest executionTypeRequest = ExecutionTypeRequest.newInstance(); - private String resourceProfile; - + private String resourceProfile = ProfileCapability.DEFAULT_PROFILE; + /** * Instantiates a {@link ContainerRequest} with the given constraints and * locality relaxation enabled. @@ -540,6 +540,11 @@ public ContainerRequestBuilder executionTypeRequest( return this; } + public ContainerRequestBuilder resourceProfile(String resourceProfile) { + containerRequest.resourceProfile = resourceProfile; + return this; + } + public ContainerRequest build() { containerRequest.sanityCheck(); return containerRequest;