| 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.api.records.impl |
Package org.apache.hadoop.yarn.api.records.impl contains classes
which define basic resources.
|
| org.apache.hadoop.yarn.exceptions |
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.
|
| org.apache.hadoop.yarn.server.api | |
| 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 | 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.
|
| Modifier and Type | Method | Description |
|---|---|---|
abstract java.util.Map<java.lang.String,Resource> |
GetAllResourceProfilesResponse.getResourceProfiles() |
|
abstract java.util.Map<java.lang.String,Resource> |
RegisterApplicationMasterResponse.getResourceProfiles() |
Get list of supported resource profiles from RM.
|
| Modifier and Type | Method | Description |
|---|---|---|
AllocateResponse.AllocateResponseBuilder |
AllocateResponse.AllocateResponseBuilder.availableResources(Resource availableResources) |
Set the
availableResources of the response. |
static AllocateResponse |
AllocateResponse.newInstance(int responseId,
java.util.List<ContainerStatus> completedContainers,
java.util.List<Container> allocatedContainers,
java.util.List<NodeReport> updatedNodes,
Resource availResources,
AMCommand command,
int numClusterNodes,
PreemptionMessage preempt,
java.util.List<NMToken> nmTokens) |
|
static AllocateResponse |
AllocateResponse.newInstance(int responseId,
java.util.List<ContainerStatus> completedContainers,
java.util.List<Container> allocatedContainers,
java.util.List<NodeReport> updatedNodes,
Resource availResources,
AMCommand command,
int numClusterNodes,
PreemptionMessage preempt,
java.util.List<NMToken> nmTokens,
CollectorInfo collectorInfo) |
|
static AllocateResponse |
AllocateResponse.newInstance(int responseId,
java.util.List<ContainerStatus> completedContainers,
java.util.List<Container> allocatedContainers,
java.util.List<NodeReport> updatedNodes,
Resource availResources,
AMCommand command,
int numClusterNodes,
PreemptionMessage preempt,
java.util.List<NMToken> nmTokens,
Token amRMToken,
java.util.List<UpdatedContainer> updatedContainers) |
|
static AllocateResponse |
AllocateResponse.newInstance(int responseId,
java.util.List<ContainerStatus> completedContainers,
java.util.List<Container> allocatedContainers,
java.util.List<NodeReport> updatedNodes,
Resource availResources,
AMCommand command,
int numClusterNodes,
PreemptionMessage preempt,
java.util.List<NMToken> nmTokens,
Token amRMToken,
java.util.List<UpdatedContainer> updatedContainers,
CollectorInfo collectorInfo) |
|
static AllocateResponse |
AllocateResponse.newInstance(int responseId,
java.util.List<ContainerStatus> completedContainers,
java.util.List<Container> allocatedContainers,
java.util.List<NodeReport> updatedNodes,
Resource availResources,
AMCommand command,
int numClusterNodes,
PreemptionMessage preempt,
java.util.List<NMToken> nmTokens,
Token amRMToken,
java.util.List<UpdatedContainer> updatedContainers,
CollectorInfo collectorInfo,
EnhancedHeadroom enhancedHeadroom) |
|
static GetNewApplicationResponse |
GetNewApplicationResponse.newInstance(ApplicationId applicationId,
Resource minCapability,
Resource maxCapability) |
|
static RegisterApplicationMasterResponse |
RegisterApplicationMasterResponse.newInstance(Resource minCapability,
Resource maxCapability,
java.util.Map<ApplicationAccessType,java.lang.String> acls,
java.nio.ByteBuffer key,
java.util.List<Container> containersFromPreviousAttempt,
java.lang.String queue,
java.util.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.
|
| Modifier and Type | Method | Description |
|---|---|---|
abstract void |
GetAllResourceProfilesResponse.setResourceProfiles(java.util.Map<java.lang.String,Resource> profiles) |
|
abstract void |
RegisterApplicationMasterResponse.setResourceProfiles(java.util.Map<java.lang.String,Resource> profiles) |
Set supported resource profiles for RM.
|
| 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 |
QueueConfigurations.getConfiguredMaxCapacity() |
Get the configured maximum capacity of queue (from absolute resource).
|
abstract Resource |
QueueConfigurations.getConfiguredMinCapacity() |
Get the configured minimum capacity of queue (from absolute resource).
|
abstract Resource |
QueueConfigurations.getEffectiveMaxCapacity() |
Get the effective maximum capacity of queue (from absolute resource).
|
abstract Resource |
QueueConfigurations.getEffectiveMinCapacity() |
Get the effective minimum capacity of queue (from absolute resource).
|
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,
java.util.Map<java.lang.String,java.lang.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) |
| 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,
java.util.Map<java.lang.String,java.lang.Long> resourceSecondsMap,
float queueUsagePerc,
float clusterUsagePerc,
java.util.Map<java.lang.String,java.lang.Long> preemtedResourceSecondsMap) |
|
static ApplicationSubmissionContext |
ApplicationSubmissionContext.newInstance(ApplicationId applicationId,
java.lang.String applicationName,
java.lang.String queue,
Priority priority,
ContainerLaunchContext amContainer,
boolean isUnmanagedAM,
boolean cancelTokensWhenComplete,
int maxAppAttempts,
Resource resource) |
|
static ApplicationSubmissionContext |
ApplicationSubmissionContext.newInstance(ApplicationId applicationId,
java.lang.String applicationName,
java.lang.String queue,
Priority priority,
ContainerLaunchContext amContainer,
boolean isUnmanagedAM,
boolean cancelTokensWhenComplete,
int maxAppAttempts,
Resource resource,
java.lang.String applicationType) |
|
static ApplicationSubmissionContext |
ApplicationSubmissionContext.newInstance(ApplicationId applicationId,
java.lang.String applicationName,
java.lang.String queue,
Priority priority,
ContainerLaunchContext amContainer,
boolean isUnmanagedAM,
boolean cancelTokensWhenComplete,
int maxAppAttempts,
Resource resource,
java.lang.String applicationType,
boolean keepContainers) |
|
static ApplicationSubmissionContext |
ApplicationSubmissionContext.newInstance(ApplicationId applicationId,
java.lang.String applicationName,
java.lang.String queue,
Priority priority,
ContainerLaunchContext amContainer,
boolean isUnmanagedAM,
boolean cancelTokensWhenComplete,
int maxAppAttempts,
Resource resource,
java.lang.String applicationType,
boolean keepContainers,
long attemptFailuresValidityInterval) |
|
static ApplicationSubmissionContext |
ApplicationSubmissionContext.newInstance(ApplicationId applicationId,
java.lang.String applicationName,
java.lang.String queue,
Priority priority,
ContainerLaunchContext amContainer,
boolean isUnmanagedAM,
boolean cancelTokensWhenComplete,
int maxAppAttempts,
Resource resource,
java.lang.String applicationType,
boolean keepContainers,
java.lang.String appLabelExpression,
java.lang.String amContainerLabelExpression) |
|
static ApplicationSubmissionContext |
ApplicationSubmissionContext.newInstance(ApplicationId applicationId,
java.lang.String applicationName,
java.lang.String queue,
Priority priority,
ContainerLaunchContext amContainer,
boolean isUnmanagedAM,
boolean cancelTokensWhenComplete,
int maxAppAttempts,
Resource resource,
java.lang.String applicationType,
boolean keepContainers,
LogAggregationContext logAggregationContext) |
|
static Container |
Container.newInstance(ContainerId containerId,
NodeId nodeId,
java.lang.String nodeHttpAddress,
Resource resource,
Priority priority,
Token containerToken) |
|
static Container |
Container.newInstance(ContainerId containerId,
NodeId nodeId,
java.lang.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,
java.lang.String diagnosticInfo,
java.lang.String logUrl,
int containerExitStatus,
ContainerState containerState,
java.lang.String nodeHttpAddress) |
|
static ContainerReport |
ContainerReport.newInstance(ContainerId containerId,
Resource allocatedResource,
NodeId assignedNode,
Priority priority,
long creationTime,
long finishTime,
java.lang.String diagnosticInfo,
java.lang.String logUrl,
int containerExitStatus,
ContainerState containerState,
java.lang.String nodeHttpAddress,
ExecutionType executionType) |
|
static NodeReport |
NodeReport.newInstance(NodeId nodeId,
NodeState nodeState,
java.lang.String httpAddress,
java.lang.String rackName,
Resource used,
Resource capability,
int numContainers,
java.lang.String healthReport,
long lastHealthReportTime) |
|
static NodeReport |
NodeReport.newInstance(NodeId nodeId,
NodeState nodeState,
java.lang.String httpAddress,
java.lang.String rackName,
Resource used,
Resource capability,
int numContainers,
java.lang.String healthReport,
long lastHealthReportTime,
java.util.Set<java.lang.String> nodeLabels,
java.lang.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,
java.lang.String hostName,
Resource capability,
int numContainers) |
|
static ResourceRequest |
ResourceRequest.newInstance(Priority priority,
java.lang.String hostName,
Resource capability,
int numContainers,
boolean relaxLocality) |
|
static ResourceRequest |
ResourceRequest.newInstance(Priority priority,
java.lang.String hostName,
Resource capability,
int numContainers,
boolean relaxLocality,
java.lang.String labelExpression) |
|
static ResourceRequest |
ResourceRequest.newInstance(Priority priority,
java.lang.String hostName,
Resource capability,
int numContainers,
boolean relaxLocality,
java.lang.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 |
QueueConfigurations.setConfiguredMaxCapacity(Resource configuredMaxResource) |
Set the configured maximum capacity of queue (from absolute resource).
|
abstract void |
QueueConfigurations.setConfiguredMinCapacity(Resource configuredMinResource) |
Set the configured minimum capacity of queue (from absolute resource).
|
abstract void |
QueueConfigurations.setEffectiveMaxCapacity(Resource capacity) |
Set the effective maximum capacity of queue (from absolute resource).
|
abstract void |
QueueConfigurations.setEffectiveMinCapacity(Resource capacity) |
Set the effective minimum capacity of queue (from absolute resource).
|
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) |
| Modifier and Type | Class | Description |
|---|---|---|
class |
LightWeightResource |
LightWeightResource extends Resource to handle base resources such
as memory and CPU. |
| Modifier and Type | Method | Description |
|---|---|---|
int |
LightWeightResource.compareTo(Resource other) |
| Constructor | Description |
|---|---|
ResourceNotFoundException(Resource resource,
java.lang.String type) |
|
ResourceNotFoundException(Resource resource,
java.lang.String type,
java.lang.Throwable cause) |
| Modifier and Type | Method | Description |
|---|---|---|
Resource |
ContainerContext.getResource() |
Get
Resource the resource capability allocated to the container
being initialized or stopped. |
| Constructor | Description |
|---|---|
ContainerContext(java.lang.String user,
ContainerId containerId,
Resource resource) |
|
ContainerContext(java.lang.String user,
ContainerId containerId,
Resource resource,
ContainerType containerType) |
|
ContainerContext(java.lang.String user,
ContainerId containerId,
Resource resource,
ContainerType containerType,
ExecutionType executionType) |
|
ContainerInitializationContext(java.lang.String user,
ContainerId containerId,
Resource resource) |
|
ContainerInitializationContext(java.lang.String user,
ContainerId containerId,
Resource resource,
ContainerType containerType) |
|
ContainerTerminationContext(java.lang.String user,
ContainerId containerId,
Resource resource) |
|
ContainerTerminationContext(java.lang.String user,
ContainerId containerId,
Resource resource,
ContainerType containerType) |
| Modifier and Type | Method | Description |
|---|---|---|
static Resource |
ResourceUtils.createResourceFromString(java.lang.String resourceStr,
java.util.List<ResourceTypeInfo> resourceTypeInfos) |
|
static Resource |
ResourceUtils.createResourceWithSameValue(long value) |
Return a new
Resource instance with all resource values
initialized to value. |
static Resource |
ResourceUtils.fetchMaximumAllocationFromConfig(org.apache.hadoop.conf.Configuration conf) |
Get maximum allocation from config, *THIS WILL NOT UPDATE INTERNAL DATA.
|
static Resource |
ResourceUtils.getResourceTypesMaximumAllocation() |
Get a Resource object with for the maximum allocation possible.
|
static Resource |
ResourceUtils.getResourceTypesMinimumAllocation() |
|
static Resource |
ResourceUtils.multiplyFloor(Resource resource,
double multiplier) |
|
static Resource |
ResourceUtils.multiplyRound(Resource resource,
double multiplier) |
| Modifier and Type | Method | Description |
|---|---|---|
static void |
ResourceUtils.areMandatoryResourcesAvailable(Resource res) |
Are mandatory resources like memory-mb, vcores available?
If not, throw exceptions.
|
static java.lang.StringBuilder |
ResourceUtils.getCustomResourcesStrings(Resource resource) |
|
static Resource |
ResourceUtils.multiplyFloor(Resource resource,
double multiplier) |
|
static Resource |
ResourceUtils.multiplyRound(Resource resource,
double multiplier) |
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.