ResourceRequest.ResourceRequestBuilder (Apache Hadoop Main 3.5.0 API)
Description: declaration: package: org.apache.hadoop.yarn.api.records, class: ResourceRequest, class: ResourceRequestBuilder

Package org.apache.hadoop.yarn.api.records

# Class ResourceRequest.ResourceRequestBuilder

java.lang.Object
org.apache.hadoop.yarn.api.records.ResourceRequest.ResourceRequestBuilder

Enclosing class:
  ResourceRequest

@Public @Stable public static final class ResourceRequest.ResourceRequestBuilder extends Object
Class to construct instances of `ResourceRequest` with specific options.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ResourceRequest.ResourceRequestBuilder`
  `allocationRequestId(long allocationRequestId)`
  Set the `allocationRequestId` of the request.
  `ResourceRequest`
  `build()`
  Return generated `ResourceRequest` object.
  `ResourceRequest.ResourceRequestBuilder`
  `capability(Resource capability)`
  Set the `capability` of the request.
  `ResourceRequest.ResourceRequestBuilder`
  `executionType(ExecutionType executionType)`
  Set the `executionTypeRequest` of the request with 'ensure execution type' flag set to true.
  `ResourceRequest.ResourceRequestBuilder`
  `executionTypeRequest(ExecutionTypeRequest executionTypeRequest)`
  Set the `executionTypeRequest` of the request.
  `ResourceRequest.ResourceRequestBuilder`
  `nodeLabelExpression(String nodeLabelExpression)`
  Set the `nodeLabelExpression` of the request.
  `ResourceRequest.ResourceRequestBuilder`
  `numContainers(int numContainers)`
  Set the `numContainers` of the request.
  `ResourceRequest.ResourceRequestBuilder`
  `priority(Priority priority)`
  Set the `priority` of the request.
  `ResourceRequest.ResourceRequestBuilder`
  `relaxLocality(boolean relaxLocality)`
  Set the `relaxLocality` of the request.
  `ResourceRequest.ResourceRequestBuilder`
  `resourceName(String resourceName)`
  Set the `resourceName` of the request.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### priority

    @Public @Stable public ResourceRequest.ResourceRequestBuilder priority(Priority priority)
    Set the `priority` of the request.
    Parameters:
      `priority` - `priority` of the request
    Returns:
      `ResourceRequest.ResourceRequestBuilder`
    See Also:
      - `ResourceRequest.setPriority(Priority)`

  - ### resourceName

    @Public @Stable public ResourceRequest.ResourceRequestBuilder resourceName(String resourceName)
    Set the `resourceName` of the request.
    Parameters:
      `resourceName` - `resourceName` of the request
    Returns:
      `ResourceRequest.ResourceRequestBuilder`
    See Also:
      - `ResourceRequest.setResourceName(String)`

  - ### capability

    @Public @Stable public ResourceRequest.ResourceRequestBuilder capability(Resource capability)
    Set the `capability` of the request.
    Parameters:
      `capability` - `capability` of the request
    Returns:
      `ResourceRequest.ResourceRequestBuilder`
    See Also:
      - `ResourceRequest.setCapability(Resource)`

  - ### numContainers

    @Public @Stable public ResourceRequest.ResourceRequestBuilder numContainers(int numContainers)
    Set the `numContainers` of the request.
    Parameters:
      `numContainers` - `numContainers` of the request
    Returns:
      `ResourceRequest.ResourceRequestBuilder`
    See Also:
      - `ResourceRequest.setNumContainers(int)`

  - ### relaxLocality

    @Public @Stable public ResourceRequest.ResourceRequestBuilder relaxLocality(boolean relaxLocality)
    Set the `relaxLocality` of the request.
    Parameters:
      `relaxLocality` - `relaxLocality` of the request
    Returns:
      `ResourceRequest.ResourceRequestBuilder`
    See Also:
      - `ResourceRequest.setRelaxLocality(boolean)`

  - ### nodeLabelExpression

    @Public @Evolving public ResourceRequest.ResourceRequestBuilder nodeLabelExpression(String nodeLabelExpression)
    Set the `nodeLabelExpression` of the request.
    Parameters:
      `nodeLabelExpression` - `nodeLabelExpression` of the request
    Returns:
      `ResourceRequest.ResourceRequestBuilder`
    See Also:
      - `ResourceRequest.setNodeLabelExpression(String)`

  - ### executionTypeRequest

    @Public @Evolving public ResourceRequest.ResourceRequestBuilder executionTypeRequest(ExecutionTypeRequest executionTypeRequest)
    Set the `executionTypeRequest` of the request.
    Parameters:
      `executionTypeRequest` - `executionTypeRequest` of the request
    Returns:
      `ResourceRequest.ResourceRequestBuilder`
    See Also:
      - `ResourceRequest.setExecutionTypeRequest(ExecutionTypeRequest)`

  - ### executionType

    @Public @Evolving public ResourceRequest.ResourceRequestBuilder executionType(ExecutionType executionType)
    Set the `executionTypeRequest` of the request with 'ensure execution type' flag set to true.
    Parameters:
      `executionType` - `executionType` of the request.
    Returns:
      `ResourceRequest.ResourceRequestBuilder`
    See Also:
      - `ResourceRequest.setExecutionTypeRequest(ExecutionTypeRequest)`

  - ### allocationRequestId

    @Public @Evolving public ResourceRequest.ResourceRequestBuilder allocationRequestId(long allocationRequestId)
    Set the `allocationRequestId` of the request.
    Parameters:
      `allocationRequestId` - `allocationRequestId` of the request
    Returns:
      `ResourceRequest.ResourceRequestBuilder`
    See Also:
      - `ResourceRequest.setAllocationRequestId(long)`

  - ### build

    @Public @Stable public ResourceRequest build()
    Return generated `ResourceRequest` object.
    Returns:
      `ResourceRequest`