Uses of Class
org.apache.hadoop.yarn.api.records.Resource
Packages that use Resource
Package
Description
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.
Package org.apache.hadoop.yarn.api.records.impl contains classes
which define basic resources.
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.
Package org.apache.hadoop.yarn.util.resource contains classes
which is used as utility class for resource profile computations.
-
Uses of Resource in org.apache.hadoop.yarn.api.protocolrecords
Methods in org.apache.hadoop.yarn.api.protocolrecords that return ResourceModifier and TypeMethodDescriptionabstract ResourceAllocateResponse.getAvailableResources()Get the available headroom for resources in the cluster for the application.abstract ResourceGetNewApplicationResponse.getMaximumResourceCapability()Get the maximum capability for anyResourceallocated by theResourceManagerin the cluster.abstract ResourceRegisterApplicationMasterResponse.getMaximumResourceCapability()Get the maximum capability for anyResourceallocated by theResourceManagerin the cluster.abstract ResourceGetResourceProfileResponse.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 ResourceModifier and TypeMethodDescriptionGetAllResourceProfilesResponse.getResourceProfiles()RegisterApplicationMasterResponse.getResourceProfiles()Get list of supported resource profiles from RM.Methods in org.apache.hadoop.yarn.api.protocolrecords with parameters of type ResourceModifier and TypeMethodDescriptionAllocateResponse.AllocateResponseBuilder.availableResources(Resource availableResources) Set theavailableResourcesof the response.static AllocateResponseAllocateResponse.newInstance(int responseId, List<ContainerStatus> completedContainers, List<Container> allocatedContainers, List<NodeReport> updatedNodes, Resource availResources, AMCommand command, int numClusterNodes, PreemptionMessage preempt, List<NMToken> nmTokens) static AllocateResponseAllocateResponse.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 AllocateResponseAllocateResponse.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 AllocateResponseAllocateResponse.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 AllocateResponseAllocateResponse.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, EnhancedHeadroom enhancedHeadroom) static GetNewApplicationResponseGetNewApplicationResponse.newInstance(ApplicationId applicationId, Resource minCapability, Resource maxCapability) RegisterApplicationMasterResponse.newInstance(Resource minCapability, Resource maxCapability, Map<ApplicationAccessType, String> acls, ByteBuffer key, List<Container> containersFromPreviousAttempt, String queue, List<NMToken> nmTokensFromPreviousAttempts) abstract voidAllocateResponse.setAvailableResources(Resource limit) abstract voidGetNewApplicationResponse.setMaximumResourceCapability(Resource capability) abstract voidRegisterApplicationMasterResponse.setMaximumResourceCapability(Resource capability) abstract voidGetResourceProfileResponse.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 ResourceModifier and TypeMethodDescriptionabstract voidGetAllResourceProfilesResponse.setResourceProfiles(Map<String, Resource> profiles) abstract voidRegisterApplicationMasterResponse.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 ResourceModifier and TypeMethodDescriptionabstract ResourceContainerReport.getAllocatedResource()Get the allocatedResourceof the container.ContainerStatus.getCapability()Get theResourceallocated to the container.abstract ResourceNodeReport.getCapability()Get the totalResourceon the node.abstract ResourceReservationRequest.getCapability()Get theResourcecapability of the request.abstract ResourceResourceAllocationRequest.getCapability()Get the allocated resource.abstract ResourceResourceRequest.getCapability()Get theResourcecapability of the request.abstract ResourceUpdateContainerRequest.getCapability()Get theResourcecapability of the request.abstract ResourceQueueConfigurations.getConfiguredMaxCapacity()Get the configured maximum capacity of queue (from absolute resource).abstract ResourceQueueConfigurations.getConfiguredMinCapacity()Get the configured minimum capacity of queue (from absolute resource).abstract ResourceQueueConfigurations.getEffectiveMaxCapacity()Get the effective maximum capacity of queue (from absolute resource).abstract ResourceQueueConfigurations.getEffectiveMinCapacity()Get the effective minimum capacity of queue (from absolute resource).abstract ResourceApplicationResourceUsageReport.getNeededResources()Get the neededResource.abstract ResourceApplicationResourceUsageReport.getReservedResources()Get the reservedResource.abstract ResourceApplicationSubmissionContext.getResource()Get the resource required by theApplicationMasterfor this application.abstract ResourceContainer.getResource()Get theResourceallocated to the container.abstract ResourceResourceOption.getResource()Get the resource of the ResourceOption.abstract ResourceResourceSizing.getResources()abstract ResourceNodeReport.getUsed()Get usedResourceon the node.abstract ResourceApplicationResourceUsageReport.getUsedResources()Get the usedResource.static ResourceResource.newInstance(int memory, int vCores) static ResourceResource.newInstance(long memory, int vCores) static ResourceResource.newInstance(long memory, int vCores, Map<String, Long> others) Create a newResourceinstance with the given CPU and memory values and additional resource values as set in theothersparameter.static ResourceResource.newInstance(Resource resource) Methods in org.apache.hadoop.yarn.api.records with parameters of type ResourceModifier and TypeMethodDescriptionResourceRequest.ResourceRequestBuilder.capability(Resource capability) Set thecapabilityof the request.intstatic voidApplicationResourceUsageReport.newInstance(int numUsedContainers, int numReservedContainers, Resource usedResources, Resource reservedResources, Resource neededResources, Map<String, Long> resourceSecondsMap, float queueUsagePerc, float clusterUsagePerc, Map<String, Long> preemtedResourceSecondsMap) static ApplicationSubmissionContextApplicationSubmissionContext.newInstance(ApplicationId applicationId, String applicationName, String queue, Priority priority, ContainerLaunchContext amContainer, boolean isUnmanagedAM, boolean cancelTokensWhenComplete, int maxAppAttempts, Resource resource) static ApplicationSubmissionContextApplicationSubmissionContext.newInstance(ApplicationId applicationId, String applicationName, String queue, Priority priority, ContainerLaunchContext amContainer, boolean isUnmanagedAM, boolean cancelTokensWhenComplete, int maxAppAttempts, Resource resource, String applicationType) static ApplicationSubmissionContextApplicationSubmissionContext.newInstance(ApplicationId applicationId, String applicationName, String queue, Priority priority, ContainerLaunchContext amContainer, boolean isUnmanagedAM, boolean cancelTokensWhenComplete, int maxAppAttempts, Resource resource, String applicationType, boolean keepContainers) static ApplicationSubmissionContextApplicationSubmissionContext.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 ApplicationSubmissionContextApplicationSubmissionContext.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 ApplicationSubmissionContextApplicationSubmissionContext.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 ContainerContainer.newInstance(ContainerId containerId, NodeId nodeId, String nodeHttpAddress, Resource resource, Priority priority, Token containerToken) static ContainerContainer.newInstance(ContainerId containerId, NodeId nodeId, String nodeHttpAddress, Resource resource, Priority priority, Token containerToken, ExecutionType executionType) static ContainerReportContainerReport.newInstance(ContainerId containerId, Resource allocatedResource, NodeId assignedNode, Priority priority, long creationTime, long finishTime, String diagnosticInfo, String logUrl, int containerExitStatus, ContainerState containerState, String nodeHttpAddress) static ContainerReportContainerReport.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 NodeReportNodeReport.newInstance(NodeId nodeId, NodeState nodeState, String httpAddress, String rackName, Resource used, Resource capability, int numContainers, String healthReport, long lastHealthReportTime) static NodeReportNodeReport.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 ReservationRequestReservationRequest.newInstance(Resource capability, int numContainers) static ReservationRequestReservationRequest.newInstance(Resource capability, int numContainers, int concurrency, long duration) static ResourceResource.newInstance(Resource resource) static ResourceAllocationRequestResourceAllocationRequest.newInstance(long startTime, long endTime, Resource capability) static ResourceOptionResourceOption.newInstance(Resource resource, int overCommitTimeout) static ResourceRequestResourceRequest.newInstance(Priority priority, String hostName, Resource capability, int numContainers) static ResourceRequestResourceRequest.newInstance(Priority priority, String hostName, Resource capability, int numContainers, boolean relaxLocality) static ResourceRequestResourceRequest.newInstance(Priority priority, String hostName, Resource capability, int numContainers, boolean relaxLocality, String labelExpression) static ResourceRequestResourceRequest.newInstance(Priority priority, String hostName, Resource capability, int numContainers, boolean relaxLocality, String labelExpression, ExecutionTypeRequest executionTypeRequest) static ResourceSizingResourceSizing.newInstance(int numAllocations, Resource resources) static ResourceSizingResourceSizing.newInstance(Resource resources) static UpdateContainerRequestUpdateContainerRequest.newInstance(int version, ContainerId containerId, ContainerUpdateType updateType, Resource targetCapability, ExecutionType targetExecutionType) abstract voidContainerReport.setAllocatedResource(Resource resource) voidContainerStatus.setCapability(Resource capability) abstract voidNodeReport.setCapability(Resource capability) abstract voidReservationRequest.setCapability(Resource capability) Set theResourcecapability of the requestabstract voidResourceAllocationRequest.setCapability(Resource resource) Set the allocated resource.abstract voidResourceRequest.setCapability(Resource capability) Set theResourcecapability of the request.abstract voidUpdateContainerRequest.setCapability(Resource capability) Set theResourcecapability of the request.abstract voidQueueConfigurations.setConfiguredMaxCapacity(Resource configuredMaxResource) Set the configured maximum capacity of queue (from absolute resource).abstract voidQueueConfigurations.setConfiguredMinCapacity(Resource configuredMinResource) Set the configured minimum capacity of queue (from absolute resource).abstract voidQueueConfigurations.setEffectiveMaxCapacity(Resource capacity) Set the effective maximum capacity of queue (from absolute resource).abstract voidQueueConfigurations.setEffectiveMinCapacity(Resource capacity) Set the effective minimum capacity of queue (from absolute resource).abstract voidApplicationResourceUsageReport.setNeededResources(Resource needed_resources) abstract voidApplicationResourceUsageReport.setReservedResources(Resource reserved_resources) abstract voidApplicationSubmissionContext.setResource(Resource resource) Set the resource required by theApplicationMasterfor this application.abstract voidContainer.setResource(Resource resource) protected abstract voidResourceOption.setResource(Resource resource) abstract voidResourceSizing.setResources(Resource resources) abstract voidabstract voidApplicationResourceUsageReport.setUsedResources(Resource resources) -
Uses of Resource in org.apache.hadoop.yarn.api.records.impl
Subclasses of Resource in org.apache.hadoop.yarn.api.records.implModifier and TypeClassDescriptionclassLightWeightResourceextends Resource to handle base resources such as memory and CPU.Methods in org.apache.hadoop.yarn.api.records.impl with parameters of type Resource -
Uses of Resource in org.apache.hadoop.yarn.exceptions
Constructors in org.apache.hadoop.yarn.exceptions with parameters of type ResourceModifierConstructorDescriptionResourceNotFoundException(Resource resource, String type) ResourceNotFoundException(Resource resource, String type, Throwable cause) -
Uses of Resource in org.apache.hadoop.yarn.server.api
Methods in org.apache.hadoop.yarn.server.api that return ResourceModifier and TypeMethodDescriptionContainerContext.getResource()GetResourcethe resource capability allocated to the container being initialized or stopped.Constructors in org.apache.hadoop.yarn.server.api with parameters of type ResourceModifierConstructorDescriptionContainerContext(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) -
Uses of Resource in org.apache.hadoop.yarn.util.resource
Methods in org.apache.hadoop.yarn.util.resource that return ResourceModifier and TypeMethodDescriptionstatic ResourceResourceUtils.createResourceFromString(String resourceStr, List<ResourceTypeInfo> resourceTypeInfos) static ResourceResourceUtils.createResourceWithSameValue(long value) Return a newResourceinstance with all resource values initialized tovalue.static ResourceResourceUtils.fetchMaximumAllocationFromConfig(org.apache.hadoop.conf.Configuration conf) Get maximum allocation from config, *THIS WILL NOT UPDATE INTERNAL DATA.static ResourceResourceUtils.getResourceTypesMaximumAllocation()Get a Resource object with for the maximum allocation possible.static ResourceResourceUtils.getResourceTypesMinimumAllocation()static ResourceResourceUtils.multiplyFloor(Resource resource, double multiplier) static ResourceResourceUtils.multiplyRound(Resource resource, double multiplier) Methods in org.apache.hadoop.yarn.util.resource with parameters of type ResourceModifier and TypeMethodDescriptionstatic voidResourceUtils.areMandatoryResourcesAvailable(Resource res) Are mandatory resources like memory-mb, vcores available?static StringBuilderResourceUtils.getCustomResourcesStrings(Resource resource) static ResourceResourceUtils.multiplyFloor(Resource resource, double multiplier) static ResourceResourceUtils.multiplyRound(Resource resource, double multiplier)