ApplicationResourceUsageReport (Apache Hadoop YARN API 3.5.0 API)
Description: declaration: package: org.apache.hadoop.yarn.api.records, class: ApplicationResourceUsageReport

Package org.apache.hadoop.yarn.api.records

# Class ApplicationResourceUsageReport

java.lang.Object
org.apache.hadoop.yarn.api.records.ApplicationResourceUsageReport

@Public @Stable public abstract class ApplicationResourceUsageReport extends Object
Contains various scheduling metrics to be reported by UI and CLI.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ApplicationResourceUsageReport()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `abstract float`
  `getClusterUsagePercentage()`
  Get the percentage of resources of the cluster that the app is using.
  `abstract long`
  `getMemorySeconds()`
  Get the aggregated amount of memory (in megabytes) the application has allocated times the number of seconds the application has been running.
  `abstract Resource`
  `getNeededResources()`
  Get the needed `Resource`.
  `abstract int`
  `getNumReservedContainers()`
  Get the number of reserved containers
  `abstract int`
  `getNumUsedContainers()`
  Get the number of used containers
  `abstract long`
  `getPreemptedMemorySeconds()`
  Get the aggregated amount of memory preempted(in megabytes) the application has allocated times the number of seconds the application has been running.
  `abstract Map<String,Long>`
  `getPreemptedResourceSecondsMap()`
  Get the aggregated number of resources preempted that the application has allocated times the number of seconds the application has been running.
  `abstract long`
  `getPreemptedVcoreSeconds()`
  Get the aggregated number of vcores preempted that the application has allocated times the number of seconds the application has been running.
  `abstract float`
  `getQueueUsagePercentage()`
  Get the percentage of resources of the queue that the app is using.
  `abstract Resource`
  `getReservedResources()`
  Get the reserved `Resource`.
  `abstract Map<String,Long>`
  `getResourceSecondsMap()`
  Get the aggregated number of resources that the application has allocated times the number of seconds the application has been running.
  `abstract Resource`
  `getUsedResources()`
  Get the used `Resource`.
  `abstract long`
  `getVcoreSeconds()`
  Get the aggregated number of vcores that the application has allocated times the number of seconds the application has been running.
  `static ApplicationResourceUsageReport`
  `newInstance(int numUsedContainers, int numReservedContainers, Resource usedResources, Resource reservedResources, Resource neededResources, Map<String,Long> resourceSecondsMap, float queueUsagePerc, float clusterUsagePerc, Map<String,Long> preemtedResourceSecondsMap)`
  `abstract void`
  `setClusterUsagePercentage(float clusterUsagePerc)`
  Set the percentage of resources of the cluster that the app is using.
  `abstract void`
  `setMemorySeconds(long memory_seconds)`
  Set the aggregated amount of memory (in megabytes) the application has allocated times the number of seconds the application has been running.
  `abstract void`
  `setNeededResources(Resource needed_resources)`
  `abstract void`
  `setNumReservedContainers(int num_reserved_containers)`
  Set the number of reserved containers
  `abstract void`
  `setNumUsedContainers(int num_containers)`
  Set the number of used containers
  `abstract void`
  `setPreemptedMemorySeconds(long memorySeconds)`
  Set the aggregated amount of memory preempted (in megabytes) the application has allocated times the number of seconds the application has been running.
  `abstract void`
  `setPreemptedResourceSecondsMap(Map<String,Long> preemptedResourceSecondsMap)`
  Set the aggregated number of resources preempted that the application has allocated times the number of seconds the application has been running.
  `abstract void`
  `setPreemptedVcoreSeconds(long vcoreSeconds)`
  Set the aggregated number of vcores preempted that the application has allocated times the number of seconds the application has been running.
  `abstract void`
  `setQueueUsagePercentage(float queueUsagePerc)`
  Set the percentage of resources of the queue that the app is using.
  `abstract void`
  `setReservedResources(Resource reserved_resources)`
  `abstract void`
  `setResourceSecondsMap(Map<String,Long> resourceSecondsMap)`
  Set the aggregated number of resources that the application has allocated times the number of seconds the application has been running.
  `abstract void`
  `setUsedResources(Resource resources)`
  `abstract void`
  `setVcoreSeconds(long vcore_seconds)`
  Set the aggregated number of vcores that the application has allocated times the number of seconds the application has been running.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ApplicationResourceUsageReport

    public ApplicationResourceUsageReport()

- ## Method Details

  - ### newInstance

    @Private @Unstable public static ApplicationResourceUsageReport newInstance(int numUsedContainers, int numReservedContainers, Resource usedResources, Resource reservedResources, Resource neededResources, Map<String,Long> resourceSecondsMap, float queueUsagePerc, float clusterUsagePerc, Map<String,Long> preemtedResourceSecondsMap)

  - ### getNumUsedContainers

    @Public @Stable public abstract int getNumUsedContainers()
    Get the number of used containers. -1 for invalid/inaccessible reports.
    Returns:
      the number of used containers

  - ### setNumUsedContainers

    @Private @Unstable public abstract void setNumUsedContainers(int num_containers)
    Set the number of used containers
    Parameters:
      `num_containers` - the number of used containers

  - ### getNumReservedContainers

    @Private @Unstable public abstract int getNumReservedContainers()
    Get the number of reserved containers. -1 for invalid/inaccessible reports.
    Returns:
      the number of reserved containers

  - ### setNumReservedContainers

    @Private @Unstable public abstract void setNumReservedContainers(int num_reserved_containers)
    Set the number of reserved containers
    Parameters:
      `num_reserved_containers` - the number of reserved containers

  - ### getUsedResources

    @Public @Stable public abstract Resource getUsedResources()
    Get the used `Resource`. -1 for invalid/inaccessible reports.
    Returns:
      the used `Resource`

  - ### setUsedResources

    @Private @Unstable public abstract void setUsedResources(Resource resources)

  - ### getReservedResources

    @Public @Stable public abstract Resource getReservedResources()
    Get the reserved `Resource`. -1 for invalid/inaccessible reports.
    Returns:
      the reserved `Resource`

  - ### setReservedResources

    @Private @Unstable public abstract void setReservedResources(Resource reserved_resources)

  - ### getNeededResources

    @Public @Stable public abstract Resource getNeededResources()
    Get the needed `Resource`. -1 for invalid/inaccessible reports.
    Returns:
      the needed `Resource`

  - ### setNeededResources

    @Private @Unstable public abstract void setNeededResources(Resource needed_resources)

  - ### setMemorySeconds

    @Private @Unstable public abstract void setMemorySeconds(long memory_seconds)
    Set the aggregated amount of memory (in megabytes) the application has allocated times the number of seconds the application has been running.
    Parameters:
      `memory_seconds` - the aggregated amount of memory seconds

  - ### getMemorySeconds

    @Public @Unstable public abstract long getMemorySeconds()
    Get the aggregated amount of memory (in megabytes) the application has allocated times the number of seconds the application has been running.
    Returns:
      the aggregated amount of memory seconds

  - ### setVcoreSeconds

    @Private @Unstable public abstract void setVcoreSeconds(long vcore_seconds)
    Set the aggregated number of vcores that the application has allocated times the number of seconds the application has been running.
    Parameters:
      `vcore_seconds` - the aggregated number of vcore seconds

  - ### getVcoreSeconds

    @Public @Unstable public abstract long getVcoreSeconds()
    Get the aggregated number of vcores that the application has allocated times the number of seconds the application has been running.
    Returns:
      the aggregated number of vcore seconds

  - ### getQueueUsagePercentage

    @Public @Stable public abstract float getQueueUsagePercentage()
    Get the percentage of resources of the queue that the app is using.
    Returns:
      the percentage of resources of the queue that the app is using.

  - ### setQueueUsagePercentage

    @Private @Unstable public abstract void setQueueUsagePercentage(float queueUsagePerc)
    Set the percentage of resources of the queue that the app is using.
    Parameters:
      `queueUsagePerc` - the percentage of resources of the queue that the app is using.

  - ### getClusterUsagePercentage

    @Public @Stable public abstract float getClusterUsagePercentage()
    Get the percentage of resources of the cluster that the app is using.
    Returns:
      the percentage of resources of the cluster that the app is using.

  - ### setClusterUsagePercentage

    @Private @Unstable public abstract void setClusterUsagePercentage(float clusterUsagePerc)
    Set the percentage of resources of the cluster that the app is using.
    Parameters:
      `clusterUsagePerc` - the percentage of resources of the cluster that the app is using.

  - ### setPreemptedMemorySeconds

    @Private @Unstable public abstract void setPreemptedMemorySeconds(long memorySeconds)
    Set the aggregated amount of memory preempted (in megabytes) the application has allocated times the number of seconds the application has been running.
    Parameters:
      `memorySeconds` - the aggregated amount of memory seconds

  - ### getPreemptedMemorySeconds

    @Public @Unstable public abstract long getPreemptedMemorySeconds()
    Get the aggregated amount of memory preempted(in megabytes) the application has allocated times the number of seconds the application has been running.
    Returns:
      the aggregated amount of memory seconds

  - ### setPreemptedVcoreSeconds

    @Private @Unstable public abstract void setPreemptedVcoreSeconds(long vcoreSeconds)
    Set the aggregated number of vcores preempted that the application has allocated times the number of seconds the application has been running.
    Parameters:
      `vcoreSeconds` - the aggregated number of vcore seconds

  - ### getPreemptedVcoreSeconds

    @Public @Unstable public abstract long getPreemptedVcoreSeconds()
    Get the aggregated number of vcores preempted that the application has allocated times the number of seconds the application has been running.
    Returns:
      the aggregated number of vcore seconds

  - ### getResourceSecondsMap

    @Public @Unstable public abstract Map<String,Long> getResourceSecondsMap()
    Get the aggregated number of resources that the application has allocated times the number of seconds the application has been running.
    Returns:
      map containing the resource name and aggregated resource-seconds

  - ### setResourceSecondsMap

    @Private @Unstable public abstract void setResourceSecondsMap(Map<String,Long> resourceSecondsMap)
    Set the aggregated number of resources that the application has allocated times the number of seconds the application has been running.
    Parameters:
      `resourceSecondsMap` - map containing the resource name and aggregated resource-seconds

  - ### getPreemptedResourceSecondsMap

    @Public @Unstable public abstract Map<String,Long> getPreemptedResourceSecondsMap()
    Get the aggregated number of resources preempted that the application has allocated times the number of seconds the application has been running.
    Returns:
      map containing the resource name and aggregated preempted resource-seconds

  - ### setPreemptedResourceSecondsMap

    @Private @Unstable public abstract void setPreemptedResourceSecondsMap(Map<String,Long> preemptedResourceSecondsMap)
    Set the aggregated number of resources preempted that the application has allocated times the number of seconds the application has been running.
    Parameters:
      `preemptedResourceSecondsMap` - map containing the resource name and aggregated preempted resource-seconds