Uses of Class org.apache.hadoop.yarn.api.records.Resource (Apache Hadoop Main 3.5.0 API)
Description: use: package: org.apache.hadoop.yarn.api.records, class: Resource

# Uses of Class
org.apache.hadoop.yarn.api.records.Resource

Packages that use Resource
Package
Description
org.apache.hadoop.yarn.api.protocolrecords
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
org.apache.hadoop.yarn.api.records
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
org.apache.hadoop.yarn.client.api
org.apache.hadoop.yarn.client.api.async
org.apache.hadoop.yarn.exceptions
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
org.apache.hadoop.yarn.security
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.

- ## Uses of Resource in org.apache.hadoop.yarn.api.protocolrecords

  Methods in org.apache.hadoop.yarn.api.protocolrecords that return Resource
  Modifier and Type
  Method
  Description
  `abstract Resource`
  AllocateResponse.`getAvailableResources()`
  Get the available headroom for resources in the cluster for the application.
  `abstract Resource`
  GetNewApplicationResponse.`getMaximumResourceCapability()`
  Get the maximum capability for any `Resource` allocated by the `ResourceManager` in the cluster.
  `abstract Resource`
  RegisterApplicationMasterResponse.`getMaximumResourceCapability()`
  Get the maximum capability for any `Resource` allocated by the `ResourceManager` in the cluster.
  `abstract Resource`
  GetResourceProfileResponse.`getResource()`
  Get the resources that will be allocated if the profile was used.
  Methods in org.apache.hadoop.yarn.api.protocolrecords that return types with arguments of type Resource
  Modifier and Type
  Method
  Description
  `abstract Map<String,Resource>`
  GetAllResourceProfilesResponse.`getResourceProfiles()`
  `abstract Map<String,Resource>`
  RegisterApplicationMasterResponse.`getResourceProfiles()`
  Get list of supported resource profiles from RM.
  Methods in org.apache.hadoop.yarn.api.protocolrecords with parameters of type Resource
  Modifier and Type
  Method
  Description
  `static AllocateResponse`
  AllocateResponse.`newInstance(int responseId, List<ContainerStatus> completedContainers, List<Container> allocatedContainers, List<NodeReport> updatedNodes, Resource availResources, AMCommand command, int numClusterNodes, PreemptionMessage preempt, List<NMToken> nmTokens)`
  `static AllocateResponse`
  AllocateResponse.`newInstance(int responseId, List<ContainerStatus> completedContainers, List<Container> allocatedContainers, List<NodeReport> updatedNodes, Resource availResources, AMCommand command, int numClusterNodes, PreemptionMessage preempt, List<NMToken> nmTokens, CollectorInfo collectorInfo)`
  `static AllocateResponse`
  AllocateResponse.`newInstance(int responseId, List<ContainerStatus> completedContainers, List<Container> allocatedContainers, List<NodeReport> updatedNodes, Resource availResources, AMCommand command, int numClusterNodes, PreemptionMessage preempt, List<NMToken> nmTokens, Token amRMToken, List<UpdatedContainer> updatedContainers)`
  `static AllocateResponse`
  AllocateResponse.`newInstance(int responseId, List<ContainerStatus> completedContainers, List<Container> allocatedContainers, List<NodeReport> updatedNodes, Resource availResources, AMCommand command, int numClusterNodes, PreemptionMessage preempt, List<NMToken> nmTokens, Token amRMToken, List<UpdatedContainer> updatedContainers, CollectorInfo collectorInfo)`
  `static AllocateResponse`
  AllocateResponse.`newInstance(int responseId, List<ContainerStatus> completedContainers, List<Container> allocatedContainers, List<NodeReport> updatedNodes, Resource availResources, AMCommand command, int numClusterNodes, PreemptionMessage preempt, List<NMToken> nmTokens, Token amRMToken, List<UpdatedContainer> updatedContainers, CollectorInfo collectorInfo, org.apache.hadoop.yarn.api.records.EnhancedHeadroom enhancedHeadroom)`
  `static GetNewApplicationResponse`
  GetNewApplicationResponse.`newInstance(ApplicationId applicationId, Resource minCapability, Resource maxCapability)`
  `static RegisterApplicationMasterResponse`
  RegisterApplicationMasterResponse.`newInstance(Resource minCapability, Resource maxCapability, Map<ApplicationAccessType,String> acls, ByteBuffer key, List<Container> containersFromPreviousAttempt, String queue, List<NMToken> nmTokensFromPreviousAttempts)`
  `abstract void`
  AllocateResponse.`setAvailableResources(Resource limit)`
  `abstract void`
  GetNewApplicationResponse.`setMaximumResourceCapability(Resource capability)`
  `abstract void`
  RegisterApplicationMasterResponse.`setMaximumResourceCapability(Resource capability)`
  `abstract void`
  GetResourceProfileResponse.`setResource(Resource r)`
  Set the resources that will be allocated if the profile is used.
  Method parameters in org.apache.hadoop.yarn.api.protocolrecords with type arguments of type Resource
  Modifier and Type
  Method
  Description
  `abstract void`
  GetAllResourceProfilesResponse.`setResourceProfiles(Map<String,Resource> profiles)`
  `abstract void`
  RegisterApplicationMasterResponse.`setResourceProfiles(Map<String,Resource> profiles)`
  Set supported resource profiles for RM.

- ## Uses of Resource in org.apache.hadoop.yarn.api.records

  Methods in org.apache.hadoop.yarn.api.records that return Resource
  Modifier and Type
  Method
  Description
  `abstract Resource`
  ContainerReport.`getAllocatedResource()`
  Get the allocated `Resource` of the container.
  `Resource`
  ContainerStatus.`getCapability()`
  Get the `Resource` allocated to the container.
  `abstract Resource`
  NodeReport.`getCapability()`
  Get the total `Resource` on the node.
  `abstract Resource`
  ReservationRequest.`getCapability()`
  Get the `Resource` capability of the request.
  `abstract Resource`
  ResourceAllocationRequest.`getCapability()`
  Get the allocated resource.
  `abstract Resource`
  ResourceRequest.`getCapability()`
  Get the `Resource` capability of the request.
  `abstract Resource`
  UpdateContainerRequest.`getCapability()`
  Get the `Resource` capability of the request.
  `abstract Resource`
  ApplicationResourceUsageReport.`getNeededResources()`
  Get the needed `Resource`.
  `abstract Resource`
  ApplicationResourceUsageReport.`getReservedResources()`
  Get the reserved `Resource`.
  `abstract Resource`
  ApplicationSubmissionContext.`getResource()`
  Get the resource required by the `ApplicationMaster` for this application.
  `abstract Resource`
  Container.`getResource()`
  Get the `Resource` allocated to the container.
  `abstract Resource`
  ResourceOption.`getResource()`
  Get the resource of the ResourceOption.
  `abstract Resource`
  ResourceSizing.`getResources()`
  `abstract Resource`
  NodeReport.`getUsed()`
  Get used `Resource` on the node.
  `abstract Resource`
  ApplicationResourceUsageReport.`getUsedResources()`
  Get the used `Resource`.
  `static Resource`
  Resource.`newInstance(int memory, int vCores)`
  `static Resource`
  Resource.`newInstance(long memory, int vCores)`
  `static Resource`
  Resource.`newInstance(long memory, int vCores, Map<String,Long> others)`
  Create a new `Resource` instance with the given CPU and memory values and additional resource values as set in the `others` parameter.
  `static Resource`
  Resource.`newInstance(Resource resource)`
  Methods in org.apache.hadoop.yarn.api.records with parameters of type Resource
  Modifier and Type
  Method
  Description
  `ResourceRequest.ResourceRequestBuilder`
  ResourceRequest.ResourceRequestBuilder.`capability(Resource capability)`
  Set the `capability` of the request.
  `int`
  Resource.`compareTo(Resource other)`
  `static void`
  Resource.`copy(Resource source, Resource dest)`
  `static ApplicationResourceUsageReport`
  ApplicationResourceUsageReport.`newInstance(int numUsedContainers, int numReservedContainers, Resource usedResources, Resource reservedResources, Resource neededResources, Map<String,Long> resourceSecondsMap, float queueUsagePerc, float clusterUsagePerc, Map<String,Long> preemtedResourceSecondsMap)`
  `static ApplicationSubmissionContext`
  ApplicationSubmissionContext.`newInstance(ApplicationId applicationId, String applicationName, String queue, Priority priority, ContainerLaunchContext amContainer, boolean isUnmanagedAM, boolean cancelTokensWhenComplete, int maxAppAttempts, Resource resource)`
  `static ApplicationSubmissionContext`
  ApplicationSubmissionContext.`newInstance(ApplicationId applicationId, String applicationName, String queue, Priority priority, ContainerLaunchContext amContainer, boolean isUnmanagedAM, boolean cancelTokensWhenComplete, int maxAppAttempts, Resource resource, String applicationType)`
  `static ApplicationSubmissionContext`
  ApplicationSubmissionContext.`newInstance(ApplicationId applicationId, String applicationName, String queue, Priority priority, ContainerLaunchContext amContainer, boolean isUnmanagedAM, boolean cancelTokensWhenComplete, int maxAppAttempts, Resource resource, String applicationType, boolean keepContainers)`
  `static ApplicationSubmissionContext`
  ApplicationSubmissionContext.`newInstance(ApplicationId applicationId, String applicationName, String queue, Priority priority, ContainerLaunchContext amContainer, boolean isUnmanagedAM, boolean cancelTokensWhenComplete, int maxAppAttempts, Resource resource, String applicationType, boolean keepContainers, long attemptFailuresValidityInterval)`
  `static ApplicationSubmissionContext`
  ApplicationSubmissionContext.`newInstance(ApplicationId applicationId, String applicationName, String queue, Priority priority, ContainerLaunchContext amContainer, boolean isUnmanagedAM, boolean cancelTokensWhenComplete, int maxAppAttempts, Resource resource, String applicationType, boolean keepContainers, String appLabelExpression, String amContainerLabelExpression)`
  `static ApplicationSubmissionContext`
  ApplicationSubmissionContext.`newInstance(ApplicationId applicationId, String applicationName, String queue, Priority priority, ContainerLaunchContext amContainer, boolean isUnmanagedAM, boolean cancelTokensWhenComplete, int maxAppAttempts, Resource resource, String applicationType, boolean keepContainers, LogAggregationContext logAggregationContext)`
  `static Container`
  Container.`newInstance(ContainerId containerId, NodeId nodeId, String nodeHttpAddress, Resource resource, Priority priority, Token containerToken)`
  `static Container`
  Container.`newInstance(ContainerId containerId, NodeId nodeId, String nodeHttpAddress, Resource resource, Priority priority, Token containerToken, ExecutionType executionType)`
  `static ContainerReport`
  ContainerReport.`newInstance(ContainerId containerId, Resource allocatedResource, NodeId assignedNode, Priority priority, long creationTime, long finishTime, String diagnosticInfo, String logUrl, int containerExitStatus, ContainerState containerState, String nodeHttpAddress)`
  `static ContainerReport`
  ContainerReport.`newInstance(ContainerId containerId, Resource allocatedResource, NodeId assignedNode, Priority priority, long creationTime, long finishTime, String diagnosticInfo, String logUrl, int containerExitStatus, ContainerState containerState, String nodeHttpAddress, ExecutionType executionType)`
  `static NodeReport`
  NodeReport.`newInstance(NodeId nodeId, NodeState nodeState, String httpAddress, String rackName, Resource used, Resource capability, int numContainers, String healthReport, long lastHealthReportTime)`
  `static NodeReport`
  NodeReport.`newInstance(NodeId nodeId, NodeState nodeState, String httpAddress, String rackName, Resource used, Resource capability, int numContainers, String healthReport, long lastHealthReportTime, Set<String> nodeLabels, Integer decommissioningTimeout, NodeUpdateType nodeUpdateType)`
  `static ReservationRequest`
  ReservationRequest.`newInstance(Resource capability, int numContainers)`
  `static ReservationRequest`
  ReservationRequest.`newInstance(Resource capability, int numContainers, int concurrency, long duration)`
  `static Resource`
  Resource.`newInstance(Resource resource)`
  `static ResourceAllocationRequest`
  ResourceAllocationRequest.`newInstance(long startTime, long endTime, Resource capability)`
  `static ResourceOption`
  ResourceOption.`newInstance(Resource resource, int overCommitTimeout)`
  `static ResourceRequest`
  ResourceRequest.`newInstance(Priority priority, String hostName, Resource capability, int numContainers)`
  `static ResourceRequest`
  ResourceRequest.`newInstance(Priority priority, String hostName, Resource capability, int numContainers, boolean relaxLocality)`
  `static ResourceRequest`
  ResourceRequest.`newInstance(Priority priority, String hostName, Resource capability, int numContainers, boolean relaxLocality, String labelExpression)`
  `static ResourceRequest`
  ResourceRequest.`newInstance(Priority priority, String hostName, Resource capability, int numContainers, boolean relaxLocality, String labelExpression, ExecutionTypeRequest executionTypeRequest)`
  `static ResourceSizing`
  ResourceSizing.`newInstance(int numAllocations, Resource resources)`
  `static ResourceSizing`
  ResourceSizing.`newInstance(Resource resources)`
  `static UpdateContainerRequest`
  UpdateContainerRequest.`newInstance(int version, ContainerId containerId, ContainerUpdateType updateType, Resource targetCapability, ExecutionType targetExecutionType)`
  `abstract void`
  ContainerReport.`setAllocatedResource(Resource resource)`
  `void`
  ContainerStatus.`setCapability(Resource capability)`
  `abstract void`
  NodeReport.`setCapability(Resource capability)`
  `abstract void`
  ReservationRequest.`setCapability(Resource capability)`
  Set the `Resource` capability of the request
  `abstract void`
  ResourceAllocationRequest.`setCapability(Resource resource)`
  Set the allocated resource.
  `abstract void`
  ResourceRequest.`setCapability(Resource capability)`
  Set the `Resource` capability of the request.
  `abstract void`
  UpdateContainerRequest.`setCapability(Resource capability)`
  Set the `Resource` capability of the request.
  `abstract void`
  ApplicationResourceUsageReport.`setNeededResources(Resource needed_resources)`
  `abstract void`
  ApplicationResourceUsageReport.`setReservedResources(Resource reserved_resources)`
  `abstract void`
  ApplicationSubmissionContext.`setResource(Resource resource)`
  Set the resource required by the `ApplicationMaster` for this application.
  `abstract void`
  Container.`setResource(Resource resource)`
  `protected abstract void`
  ResourceOption.`setResource(Resource resource)`
  `abstract void`
  ResourceSizing.`setResources(Resource resources)`
  `abstract void`
  NodeReport.`setUsed(Resource used)`
  `abstract void`
  ApplicationResourceUsageReport.`setUsedResources(Resource resources)`

- ## Uses of Resource in org.apache.hadoop.yarn.client.api

  Methods in org.apache.hadoop.yarn.client.api that return Resource
  Modifier and Type
  Method
  Description
  `abstract Resource`
  AMRMClient.`getAvailableResources()`
  Get the currently available resources in the cluster.
  `abstract Resource`
  YarnClient.`getResourceProfile(String profile)`
  Get the details of a specific resource profile from the RM.
  Methods in org.apache.hadoop.yarn.client.api that return types with arguments of type Resource
  Modifier and Type
  Method
  Description
  `abstract Map<String,Resource>`
  YarnClient.`getResourceProfiles()`
  Get the resource profiles available in the RM.
  Methods in org.apache.hadoop.yarn.client.api with parameters of type Resource
  Modifier and Type
  Method
  Description
  `List<? extends Collection<T>>`
  AMRMClient.`getMatchingRequests(Priority priority, String resourceName, ExecutionType executionType, Resource capability)`
  Get outstanding `ContainerRequest`s matching the given parameters.
  `List<? extends Collection<T>>`
  AMRMClient.`getMatchingRequests(Priority priority, String resourceName, ExecutionType executionType, Resource capability, String profile)`
  `abstract List<? extends Collection<T>>`
  AMRMClient.`getMatchingRequests(Priority priority, String resourceName, Resource capability)`
  Get outstanding `ContainerRequest`s matching the given parameters.
  `void`
  AMRMClient.`requestContainerResourceChange(Container container, Resource capability)`
  Deprecated.
  use `AMRMClient.requestContainerUpdate(Container, UpdateContainerRequest)`

- ## Uses of Resource in org.apache.hadoop.yarn.client.api.async

  Methods in org.apache.hadoop.yarn.client.api.async that return Resource
  Modifier and Type
  Method
  Description
  `abstract Resource`
  AMRMClientAsync.`getAvailableResources()`
  Get the currently available resources in the cluster.
  Methods in org.apache.hadoop.yarn.client.api.async with parameters of type Resource
  Modifier and Type
  Method
  Description
  `List<? extends Collection<T>>`
  AMRMClientAsync.`getMatchingRequests(Priority priority, String resourceName, ExecutionType executionType, Resource capability)`
  Returns all matching ContainerRequests that match the given Priority, ResourceName, ExecutionType and Capability.
  `abstract List<? extends Collection<T>>`
  AMRMClientAsync.`getMatchingRequests(Priority priority, String resourceName, Resource capability)`
  `void`
  AMRMClientAsync.`requestContainerResourceChange(Container container, Resource capability)`
  Deprecated.
  use `AMRMClientAsync.requestContainerUpdate(Container, UpdateContainerRequest)`

- ## Uses of Resource in org.apache.hadoop.yarn.exceptions

  Constructors in org.apache.hadoop.yarn.exceptions with parameters of type Resource
  Modifier
  Constructor
  Description
  ``
  `ResourceNotFoundException(Resource resource, String type)`
  ``
  `ResourceNotFoundException(Resource resource, String type, Throwable cause)`

- ## Uses of Resource in org.apache.hadoop.yarn.security

  Methods in org.apache.hadoop.yarn.security that return Resource
  Modifier and Type
  Method
  Description
  `Resource`
  ContainerTokenIdentifier.`getResource()`
  Constructors in org.apache.hadoop.yarn.security with parameters of type Resource
  Modifier
  Constructor
  Description
  ``
  `ContainerTokenIdentifier(ContainerId containerID, int containerVersion, String hostName, String appSubmitter, Resource r, long expiryTimeStamp, int masterKeyId, long rmIdentifier, Priority priority, long creationTime, LogAggregationContext logAggregationContext, String nodeLabelExpression, org.apache.hadoop.yarn.server.api.ContainerType containerType, ExecutionType executionType)`
  ``
  `ContainerTokenIdentifier(ContainerId containerID, int containerVersion, String hostName, String appSubmitter, Resource r, long expiryTimeStamp, int masterKeyId, long rmIdentifier, Priority priority, long creationTime, LogAggregationContext logAggregationContext, String nodeLabelExpression, org.apache.hadoop.yarn.server.api.ContainerType containerType, ExecutionType executionType, long allocationRequestId)`
  Convenience Constructor for existing clients.
  ``
  `ContainerTokenIdentifier(ContainerId containerID, int containerVersion, String hostName, String appSubmitter, Resource r, long expiryTimeStamp, int masterKeyId, long rmIdentifier, Priority priority, long creationTime, LogAggregationContext logAggregationContext, String nodeLabelExpression, org.apache.hadoop.yarn.server.api.ContainerType containerType, ExecutionType executionType, long allocationRequestId, Set<String> allocationTags)`
  Create a Container Token Identifier.
  ``
  `ContainerTokenIdentifier(ContainerId containerID, String hostName, String appSubmitter, Resource r, long expiryTimeStamp, int masterKeyId, long rmIdentifier, Priority priority, long creationTime)`
  ``
  `ContainerTokenIdentifier(ContainerId containerID, String hostName, String appSubmitter, Resource r, long expiryTimeStamp, int masterKeyId, long rmIdentifier, Priority priority, long creationTime, LogAggregationContext logAggregationContext)`
  Deprecated.
  Use one of the other constructors instead.
  ``
  `ContainerTokenIdentifier(ContainerId containerID, String hostName, String appSubmitter, Resource r, long expiryTimeStamp, int masterKeyId, long rmIdentifier, Priority priority, long creationTime, LogAggregationContext logAggregationContext, String nodeLabelExpression)`
  ``
  `ContainerTokenIdentifier(ContainerId containerID, String hostName, String appSubmitter, Resource r, long expiryTimeStamp, int masterKeyId, long rmIdentifier, Priority priority, long creationTime, LogAggregationContext logAggregationContext, String nodeLabelExpression, org.apache.hadoop.yarn.server.api.ContainerType containerType)`