Class ResourceRequest.ResourceRequestBuilder
java.lang.Object
org.apache.hadoop.yarn.api.records.ResourceRequest.ResourceRequestBuilder
- Enclosing class:
- ResourceRequest
Class to construct instances of
ResourceRequest with specific
options.-
Method Summary
Modifier and TypeMethodDescriptionallocationRequestId(long allocationRequestId) Set theallocationRequestIdof the request.build()Return generatedResourceRequestobject.capability(Resource capability) Set thecapabilityof the request.executionType(ExecutionType executionType) Set theexecutionTypeRequestof the request with 'ensure execution type' flag set to true.executionTypeRequest(ExecutionTypeRequest executionTypeRequest) Set theexecutionTypeRequestof the request.nodeLabelExpression(String nodeLabelExpression) Set thenodeLabelExpressionof the request.numContainers(int numContainers) Set thenumContainersof the request.Set thepriorityof the request.relaxLocality(boolean relaxLocality) Set therelaxLocalityof the request.resourceName(String resourceName) Set theresourceNameof the request.
-
Method Details
-
priority
Set thepriorityof the request.- Parameters:
priority-priorityof the request- Returns:
ResourceRequest.ResourceRequestBuilder- See Also:
-
resourceName
Set theresourceNameof the request.- Parameters:
resourceName-resourceNameof the request- Returns:
ResourceRequest.ResourceRequestBuilder- See Also:
-
capability
Set thecapabilityof the request.- Parameters:
capability-capabilityof the request- Returns:
ResourceRequest.ResourceRequestBuilder- See Also:
-
numContainers
Set thenumContainersof the request.- Parameters:
numContainers-numContainersof the request- Returns:
ResourceRequest.ResourceRequestBuilder- See Also:
-
relaxLocality
Set therelaxLocalityof the request.- Parameters:
relaxLocality-relaxLocalityof the request- Returns:
ResourceRequest.ResourceRequestBuilder- See Also:
-
nodeLabelExpression
@Public @Evolving public ResourceRequest.ResourceRequestBuilder nodeLabelExpression(String nodeLabelExpression) Set thenodeLabelExpressionof the request.- Parameters:
nodeLabelExpression-nodeLabelExpressionof the request- Returns:
ResourceRequest.ResourceRequestBuilder- See Also:
-
executionTypeRequest
@Public @Evolving public ResourceRequest.ResourceRequestBuilder executionTypeRequest(ExecutionTypeRequest executionTypeRequest) Set theexecutionTypeRequestof the request.- Parameters:
executionTypeRequest-executionTypeRequestof the request- Returns:
ResourceRequest.ResourceRequestBuilder- See Also:
-
executionType
@Public @Evolving public ResourceRequest.ResourceRequestBuilder executionType(ExecutionType executionType) Set theexecutionTypeRequestof the request with 'ensure execution type' flag set to true.- Parameters:
executionType-executionTypeof the request.- Returns:
ResourceRequest.ResourceRequestBuilder- See Also:
-
allocationRequestId
@Public @Evolving public ResourceRequest.ResourceRequestBuilder allocationRequestId(long allocationRequestId) Set theallocationRequestIdof the request.- Parameters:
allocationRequestId-allocationRequestIdof the request- Returns:
ResourceRequest.ResourceRequestBuilder- See Also:
-
build
Return generatedResourceRequestobject.- Returns:
ResourceRequest
-