Class SchedContainerChangeRequest

java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedContainerChangeRequest
All Implemented Interfaces:
Comparable<SchedContainerChangeRequest>

public class SchedContainerChangeRequest extends Object implements Comparable<SchedContainerChangeRequest>
This is UpdateContainerRequest in scheduler side, it contains some pointers to runtime objects like RMContainer, SchedulerNode, etc. This will be easier for scheduler making decision.
  • Constructor Details

    • SchedContainerChangeRequest

      public SchedContainerChangeRequest(RMContext rmContext, SchedulerNode schedulerNode, RMContainer rmContainer, org.apache.hadoop.yarn.api.records.Resource targetCapacity)
  • Method Details

    • getNodeId

      public org.apache.hadoop.yarn.api.records.NodeId getNodeId()
    • getRMContainer

      public RMContainer getRMContainer()
    • getTargetCapacity

      public org.apache.hadoop.yarn.api.records.Resource getTargetCapacity()
    • getRmContext

      public RMContext getRmContext()
    • getDeltaCapacity

      public org.apache.hadoop.yarn.api.records.Resource getDeltaCapacity()
      Delta capacity = target - before, so if it is a decrease request, delta capacity will be negative.
      Returns:
      delta Capacity.
    • getPriority

      public org.apache.hadoop.yarn.api.records.Priority getPriority()
    • getContainerId

      public org.apache.hadoop.yarn.api.records.ContainerId getContainerId()
    • getNodePartition

      public String getNodePartition()
    • getSchedulerNode

      public SchedulerNode getSchedulerNode()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • compareTo

      public int compareTo(SchedContainerChangeRequest other)
      Specified by:
      compareTo in interface Comparable<SchedContainerChangeRequest>
    • toString

      public String toString()
      Overrides:
      toString in class Object