org.apache.hadoop.yarn.api.records

## Class ApplicationResourceUsageReport

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

-     @InterfaceAudience.Public
       @InterfaceStability.Stable
      public abstract class ApplicationResourceUsageReport
      extends Object

  Contains various scheduling metrics to be reported by UI and CLI.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ApplicationResourceUsageReport()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and 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` | `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.

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

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

- - ### Constructor Detail

    - #### ApplicationResourceUsageReport

          public ApplicationResourceUsageReport()

  - ### Method Detail

    - #### getNumUsedContainers

          @InterfaceAudience.Public
           @InterfaceStability.Stable
          public abstract int getNumUsedContainers()

      Get the number of used containers. -1 for invalid/inaccessible reports.
      Returns:
        the number of used containers

    - #### getUsedResources

          @InterfaceAudience.Public
           @InterfaceStability.Stable
          public abstract Resource getUsedResources()

      Get the used `Resource`. -1 for invalid/inaccessible reports.
      Returns:
        the used `Resource`

    - #### getReservedResources

          @InterfaceAudience.Public
           @InterfaceStability.Stable
          public abstract Resource getReservedResources()

      Get the reserved `Resource`. -1 for invalid/inaccessible reports.
      Returns:
        the reserved `Resource`

    - #### getNeededResources

          @InterfaceAudience.Public
           @InterfaceStability.Stable
          public abstract Resource getNeededResources()

      Get the needed `Resource`. -1 for invalid/inaccessible reports.
      Returns:
        the needed `Resource`

    - #### getMemorySeconds

          @InterfaceAudience.Public
           @InterfaceStability.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

    - #### getVcoreSeconds

          @InterfaceAudience.Public
           @InterfaceStability.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

          @InterfaceAudience.Public
           @InterfaceStability.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.

    - #### getClusterUsagePercentage

          @InterfaceAudience.Public
           @InterfaceStability.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.

    - #### getPreemptedMemorySeconds

          @InterfaceAudience.Public
           @InterfaceStability.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

    - #### getPreemptedVcoreSeconds

          @InterfaceAudience.Public
           @InterfaceStability.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

          @InterfaceAudience.Public
           @InterfaceStability.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

    - #### getPreemptedResourceSecondsMap

          @InterfaceAudience.Public
           @InterfaceStability.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

Copyright © 2022 Apache Software Foundation. All rights reserved.