YARN-7199. Fix TestAMRMClientContainerRequest.testOpportunisticAndGuaranteedRequests. (Botong Huang via asuresh)

This commit is contained in:
Arun Suresh 2017-09-18 11:26:44 -07:00
parent 0adc0471d0
commit 29dd55153e
1 changed files with 7 additions and 2 deletions

View File

@ -118,7 +118,7 @@ public abstract class AMRMClient<T extends AMRMClient.ContainerRequest> extends
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
@ -540,6 +540,11 @@ public abstract class AMRMClient<T extends AMRMClient.ContainerRequest> extends
return this;
}
public ContainerRequestBuilder resourceProfile(String resourceProfile) {
containerRequest.resourceProfile = resourceProfile;
return this;
}
public ContainerRequest build() {
containerRequest.sanityCheck();
return containerRequest;