Package | Description |
---|---|
org.apache.hadoop.yarn.api.protocolrecords | |
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.exceptions | |
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 and Description |
---|---|
abstract Resource |
AllocateResponse.getAvailableResources()
Get the available headroom for resources in the cluster for the
application.
|
abstract Resource |
RegisterApplicationMasterResponse.getMaximumResourceCapability()
Get the maximum capability for any
Resource allocated by the
ResourceManager in the cluster. |
abstract Resource |
GetNewApplicationResponse.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 and Description |
---|---|
abstract Map<String,Resource> |
RegisterApplicationMasterResponse.getResourceProfiles()
Get list of supported resource profiles from RM.
|
abstract Map<String,Resource> |
GetAllResourceProfilesResponse.getResourceProfiles() |
Modifier and Type | Method and Description |
---|---|
AllocateResponse.AllocateResponseBuilder |
AllocateResponse.AllocateResponseBuilder.availableResources(Resource availableResources)
Set the
availableResources of the response. |
static GetNewApplicationResponse |
GetNewApplicationResponse.newInstance(ApplicationId applicationId,
Resource minCapability,
Resource maxCapability) |
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 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 |
RegisterApplicationMasterResponse.setMaximumResourceCapability(Resource capability) |
abstract void |
GetNewApplicationResponse.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 and Description |
---|---|
abstract void |
RegisterApplicationMasterResponse.setResourceProfiles(Map<String,Resource> profiles)
Set supported resource profiles for RM.
|
abstract void |
GetAllResourceProfilesResponse.setResourceProfiles(Map<String,Resource> profiles) |
Modifier and Type | Method and Description |
---|---|
abstract Resource |
ContainerReport.getAllocatedResource()
Get the allocated
Resource of the container. |
abstract Resource |
ReservationRequest.getCapability()
Get the
Resource capability of the request. |
abstract Resource |
UpdateContainerRequest.getCapability()
Get the
Resource capability of the request. |
abstract Resource |
NodeReport.getCapability()
Get the total
Resource on the node. |
Resource |
ContainerStatus.getCapability()
Get the
Resource allocated to the container. |
abstract Resource |
ResourceRequest.getCapability()
Get the
Resource capability of the request. |
abstract Resource |
ResourceAllocationRequest.getCapability()
Get the allocated resource.
|
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 |
Container.getResource()
Get the
Resource allocated to the container. |
abstract Resource |
ApplicationSubmissionContext.getResource()
Get the resource required by the
ApplicationMaster for this
application. |
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) |
Modifier and Type | Method and 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 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,
LogAggregationContext logAggregationContext) |
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 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 UpdateContainerRequest |
UpdateContainerRequest.newInstance(int version,
ContainerId containerId,
ContainerUpdateType updateType,
Resource targetCapability,
ExecutionType targetExecutionType) |
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 ResourceSizing |
ResourceSizing.newInstance(int numAllocations,
Resource resources) |
static ResourceAllocationRequest |
ResourceAllocationRequest.newInstance(long startTime,
long endTime,
Resource capability) |
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 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 Resource |
Resource.newInstance(Resource resource) |
static ResourceSizing |
ResourceSizing.newInstance(Resource resources) |
static ReservationRequest |
ReservationRequest.newInstance(Resource capability,
int numContainers) |
static ResourceOption |
ResourceOption.newInstance(Resource resource,
int overCommitTimeout) |
static ReservationRequest |
ReservationRequest.newInstance(Resource capability,
int numContainers,
int concurrency,
long duration) |
abstract void |
ContainerReport.setAllocatedResource(Resource resource) |
abstract void |
ReservationRequest.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 |
NodeReport.setCapability(Resource capability) |
void |
ContainerStatus.setCapability(Resource capability) |
abstract void |
ResourceRequest.setCapability(Resource capability)
Set the
Resource capability of the request. |
abstract void |
ResourceAllocationRequest.setCapability(Resource resource)
Set the allocated resource.
|
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 |
Container.setResource(Resource resource) |
abstract void |
ApplicationSubmissionContext.setResource(Resource resource)
Set the resource required by the
ApplicationMaster for this
application. |
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 and Description |
---|---|
class |
LightWeightResource
LightWeightResource extends Resource to handle base resources such
as memory and CPU. |
Modifier and Type | Method and Description |
---|---|
int |
LightWeightResource.compareTo(Resource other) |
Constructor and Description |
---|
ResourceNotFoundException(Resource resource,
String type) |
ResourceNotFoundException(Resource resource,
String type,
Throwable cause) |
Modifier and Type | Method and Description |
---|---|
Resource |
ContainerContext.getResource()
Get
Resource the resource capability allocated to the container
being initialized or stopped. |
Constructor and Description |
---|
ContainerContext(String user,
ContainerId containerId,
Resource resource) |
ContainerContext(String user,
ContainerId containerId,
Resource resource,
ContainerType containerType) |
ContainerContext(String user,
ContainerId containerId,
Resource resource,
ContainerType containerType,
ExecutionType executionType) |
ContainerInitializationContext(String user,
ContainerId containerId,
Resource resource) |
ContainerInitializationContext(String user,
ContainerId containerId,
Resource resource,
ContainerType containerType) |
ContainerTerminationContext(String user,
ContainerId containerId,
Resource resource) |
ContainerTerminationContext(String user,
ContainerId containerId,
Resource resource,
ContainerType containerType) |
Modifier and Type | Method and Description |
---|---|
static Resource |
ResourceUtils.createResourceFromString(String resourceStr,
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() |
Modifier and Type | Method and Description |
---|---|
static void |
ResourceUtils.areMandatoryResourcesAvailable(Resource res)
Are mandatory resources like memory-mb, vcores available?
If not, throw exceptions.
|
static StringBuilder |
ResourceUtils.getCustomResourcesStrings(Resource resource) |
Copyright © 2008–2022 Apache Software Foundation. All rights reserved.