Class EnhancedHeadroom

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

public abstract class EnhancedHeadroom extends Object
Enhanced head room in AllocateResponse. This provides a channel for RMs to return load information for AMRMProxy decision making when rerouting resource requests. Contains total pending container count and active cores for a cluster.
  • Constructor Details

    • EnhancedHeadroom

      public EnhancedHeadroom()
  • Method Details

    • newInstance

      public static EnhancedHeadroom newInstance(int totalPendingCount, int totalActiveCores)
    • setTotalPendingCount

      public abstract void setTotalPendingCount(int totalPendingCount)
      Set total pending container count.
      Parameters:
      totalPendingCount - the pending container count
    • getTotalPendingCount

      public abstract int getTotalPendingCount()
      Get total pending container count.
      Returns:
      the pending container count
    • setTotalActiveCores

      public abstract void setTotalActiveCores(int totalActiveCores)
      Set total active cores for the cluster.
      Parameters:
      totalActiveCores - the total active cores for the cluster
    • getTotalActiveCores

      public abstract int getTotalActiveCores()
      Get total active cores for the cluster.
      Returns:
      totalActiveCores the total active cores for the cluster
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getNormalizedPendingCount

      public double getNormalizedPendingCount(long multiplier)