| Package | Description |
|---|---|
| org.apache.hadoop.yarn.api.records |
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.
|
| 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 | 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 | Description |
|---|---|---|
static java.util.Map<java.lang.String,ResourceInformation> |
ResourceInformation.SPECIAL_RESOURCES |
Special resources that should be treated separately
from arbitrary resource types.
|
| Modifier and Type | Method | Description |
|---|---|---|
ResourceInformation |
Resource.getResourceInformation(int index) |
Get ResourceInformation for a specified resource from a given index.
|
ResourceInformation |
Resource.getResourceInformation(java.lang.String resource) |
Get ResourceInformation for a specified resource.
|
ResourceInformation[] |
Resource.getResources() |
Get ResourceInformation for all resources.
|
protected static ResourceInformation |
Resource.newDefaultInformation(java.lang.String name,
java.lang.String unit,
long value) |
Create ResourceInformation with basic fields.
|
static ResourceInformation |
ResourceInformation.newInstance(java.lang.String name) |
|
static ResourceInformation |
ResourceInformation.newInstance(java.lang.String name,
long value) |
|
static ResourceInformation |
ResourceInformation.newInstance(java.lang.String name,
java.lang.String units) |
|
static ResourceInformation |
ResourceInformation.newInstance(java.lang.String name,
java.lang.String units,
long value) |
|
static ResourceInformation |
ResourceInformation.newInstance(java.lang.String name,
java.lang.String units,
long minRes,
long maxRes) |
|
static ResourceInformation |
ResourceInformation.newInstance(java.lang.String name,
java.lang.String units,
long value,
java.util.Set<java.lang.String> tags,
java.util.Map<java.lang.String,java.lang.String> attributes) |
|
static ResourceInformation |
ResourceInformation.newInstance(java.lang.String name,
java.lang.String units,
long value,
ResourceTypes type,
long minimumAllocation,
long maximumAllocation) |
|
static ResourceInformation |
ResourceInformation.newInstance(java.lang.String name,
java.lang.String units,
long value,
ResourceTypes type,
long minimumAllocation,
long maximumAllocation,
java.util.Set<java.lang.String> tags,
java.util.Map<java.lang.String,java.lang.String> attributes) |
|
static ResourceInformation |
ResourceInformation.newInstance(java.lang.String name,
java.lang.String units,
ResourceTypes resourceType) |
|
static ResourceInformation |
ResourceInformation.newInstance(ResourceInformation other) |
Create a new instance of ResourceInformation from another object.
|
| Modifier and Type | Method | Description |
|---|---|---|
java.util.List<ResourceInformation> |
Resource.getAllResourcesListCopy() |
Get list of resource information, this will be used by JAXB.
|
| Modifier and Type | Method | 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(java.lang.String resource,
ResourceInformation resourceInformation) |
Set the ResourceInformation object for a particular resource.
|
protected void |
Resource.setResources(ResourceInformation[] resources) |
| Constructor | Description |
|---|---|
LightWeightResource(long memory,
int vcores,
ResourceInformation[] source) |
| Modifier and Type | Method | Description |
|---|---|---|
static ResourceInformation[] |
ResourceUtils.createResourceTypesArray(java.util.Map<java.lang.String,java.lang.Long> res) |
Create an array of
ResourceInformation objects corresponding to
the passed in map of names to values. |
static ResourceInformation[] |
ResourceUtils.getResourceTypesArray() |
| Modifier and Type | Method | Description |
|---|---|---|
static java.util.Map<java.lang.String,ResourceInformation> |
ResourceUtils.getNodeResourceInformation(org.apache.hadoop.conf.Configuration conf) |
Function to get the resources for a node.
|
static java.util.List<ResourceInformation> |
ResourceUtils.getRequestedResourcesFromConfig(org.apache.hadoop.conf.Configuration configuration,
java.lang.String prefix) |
From a given configuration get all entries representing requested
resources: entries that match the {prefix}{resourceName}={value}[{units}]
pattern.
|
static java.util.Map<java.lang.String,ResourceInformation> |
ResourceUtils.getResourceTypes() |
Get the resource types to be supported by the system.
|
static java.util.Map<java.lang.String,ResourceInformation> |
ResourceUtils.resetResourceTypes(org.apache.hadoop.conf.Configuration conf) |
| Modifier and Type | Method | Description |
|---|---|---|
static void |
ResourceUtils.initializeResourcesFromResourceInformationMap(java.util.Map<java.lang.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–2025 Apache Software Foundation. All rights reserved.