| Package | Description | 
|---|---|
| org.apache.hadoop.yarn.api.records | |
| org.apache.hadoop.yarn.api.records.impl | Package org.apache.hadoop.yarn.api.records.impl contains classes
 which define basic resources. | 
| org.apache.hadoop.yarn.util.resource | Package org.apache.hadoop.yarn.util.resource contains classes
 which is used as utility class for resource profile computations. | 
| Modifier and Type | Field and Description | 
|---|---|
| static ResourceInformation | ResourceInformation. FPGAS | 
| static ResourceInformation | ResourceInformation. GPUS | 
| static ResourceInformation | ResourceInformation. MEMORY_MB | 
| protected ResourceInformation[] | Resource. resources | 
| static ResourceInformation | ResourceInformation. VCORES | 
| Modifier and Type | Field and Description | 
|---|---|
| static Map<String,ResourceInformation> | ResourceInformation. SPECIAL_RESOURCESSpecial resources that should be treated separately
 from arbitrary resource types. | 
| Modifier and Type | Method and Description | 
|---|---|
| ResourceInformation | Resource. getResourceInformation(int index)Get ResourceInformation for a specified resource from a given index. | 
| ResourceInformation | Resource. getResourceInformation(String resource)Get ResourceInformation for a specified resource. | 
| ResourceInformation[] | Resource. getResources()Get ResourceInformation for all resources. | 
| protected static ResourceInformation | Resource. newDefaultInformation(String name,
                     String unit,
                     long value)Create ResourceInformation with basic fields. | 
| static ResourceInformation | ResourceInformation. newInstance(ResourceInformation other)Create a new instance of ResourceInformation from another object. | 
| static ResourceInformation | ResourceInformation. newInstance(String name) | 
| static ResourceInformation | ResourceInformation. newInstance(String name,
           long value) | 
| static ResourceInformation | ResourceInformation. newInstance(String name,
           String units) | 
| static ResourceInformation | ResourceInformation. newInstance(String name,
           String units,
           long value) | 
| static ResourceInformation | ResourceInformation. newInstance(String name,
           String units,
           long minRes,
           long maxRes) | 
| static ResourceInformation | ResourceInformation. newInstance(String name,
           String units,
           long value,
           ResourceTypes type,
           long minimumAllocation,
           long maximumAllocation) | 
| static ResourceInformation | ResourceInformation. newInstance(String name,
           String units,
           long value,
           ResourceTypes type,
           long minimumAllocation,
           long maximumAllocation,
           Set<String> tags,
           Map<String,String> attributes) | 
| static ResourceInformation | ResourceInformation. newInstance(String name,
           String units,
           long value,
           Set<String> tags,
           Map<String,String> attributes) | 
| static ResourceInformation | ResourceInformation. newInstance(String name,
           String units,
           ResourceTypes resourceType) | 
| Modifier and Type | Method and Description | 
|---|---|
| List<ResourceInformation> | Resource. getAllResourcesListCopy()Get list of resource information, this will be used by JAXB. | 
| Modifier and Type | Method and Description | 
|---|---|
| int | ResourceInformation. compareTo(ResourceInformation other) | 
| static void | ResourceInformation. copy(ResourceInformation src,
    ResourceInformation dst)Copies the content of the source ResourceInformation object to the
 destination object, overwriting all properties of the destination object. | 
| static ResourceInformation | ResourceInformation. newInstance(ResourceInformation other)Create a new instance of ResourceInformation from another object. | 
| void | Resource. setResourceInformation(int index,
                      ResourceInformation resourceInformation)Set the ResourceInformation object for a particular resource. | 
| void | Resource. setResourceInformation(String resource,
                      ResourceInformation resourceInformation)Set the ResourceInformation object for a particular resource. | 
| Constructor and Description | 
|---|
| LightWeightResource(long memory,
                   int vcores,
                   ResourceInformation[] source) | 
| Modifier and Type | Method and Description | 
|---|---|
| static ResourceInformation[] | ResourceUtils. createResourceTypesArray(Map<String,Long> res)Create an array of  ResourceInformationobjects corresponding to
 the passed in map of names to values. | 
| static ResourceInformation[] | ResourceUtils. getResourceTypesArray() | 
| Modifier and Type | Method and Description | 
|---|---|
| static Map<String,ResourceInformation> | ResourceUtils. getNodeResourceInformation(org.apache.hadoop.conf.Configuration conf)Function to get the resources for a node. | 
| static List<ResourceInformation> | ResourceUtils. getRequestedResourcesFromConfig(org.apache.hadoop.conf.Configuration configuration,
                               String prefix)From a given configuration get all entries representing requested
 resources: entries that match the {prefix}{resourceName}={value}[{units}]
 pattern. | 
| static Map<String,ResourceInformation> | ResourceUtils. getResourceTypes()Get the resource types to be supported by the system. | 
| static Map<String,ResourceInformation> | ResourceUtils. resetResourceTypes(org.apache.hadoop.conf.Configuration conf) | 
| Modifier and Type | Method and Description | 
|---|---|
| static void | ResourceUtils. initializeResourcesFromResourceInformationMap(Map<String,ResourceInformation> resourceInformationMap)This method is visible for testing, unit test can construct a
 resourceInformationMap and pass it to this method to initialize multiple resources. | 
Copyright © 2008–2023 Apache Software Foundation. All rights reserved.