Package org.apache.storm.scheduler.resource.strategies.priority

# Class DefaultSchedulingPriorityStrategy.SimulatedUser

java.lang.Object
org.apache.storm.scheduler.resource.strategies.priority.DefaultSchedulingPriorityStrategy.SimulatedUser

Direct Known Subclasses:
  `FIFOSchedulingPriorityStrategy.FIFOSimulatedUser`, `GenericResourceAwareSchedulingPriorityStrategy.GrasSimulatedUser`

Enclosing class:
  DefaultSchedulingPriorityStrategy

protected static class DefaultSchedulingPriorityStrategy.SimulatedUser extends Object

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected double`
  `assignedCpu`
  `protected double`
  `assignedMemory`
  `final double`
  `guaranteedCpu`
  `final double`
  `guaranteedMemory`
  `protected final LinkedList<TopologyDetails>`
  `tds`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SimulatedUser(User other, ISchedulingState cluster)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `TopologyDetails`
  `getNextHighest()`
  `double`
  `getScore(double availableCpu, double availableMemory)`
  `protected double`
  `getScore(double availableCpu, double availableMemory, TopologyDetails td)`
  Get a score for the simulated user.
  `TopologyDetails`
  `simScheduleNextHighest()`

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

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

- ## Field Details

  - ### guaranteedCpu

    public final double guaranteedCpu

  - ### guaranteedMemory

    public final double guaranteedMemory

  - ### tds

    protected final LinkedList<TopologyDetails> tds

  - ### assignedCpu

    protected double assignedCpu

  - ### assignedMemory

    protected double assignedMemory

- ## Constructor Details

  - ### SimulatedUser

    public SimulatedUser(User other, ISchedulingState cluster)

- ## Method Details

  - ### getNextHighest

    public TopologyDetails getNextHighest()

  - ### simScheduleNextHighest

    public TopologyDetails simScheduleNextHighest()

  - ### getScore

    protected double getScore(double availableCpu, double availableMemory, TopologyDetails td)
    Get a score for the simulated user. This is used to sort the users, by their highest priority topology. The only requirement is that if the user is over their guarantees, or there are no available resources the returned score will be > 0. If they are under their guarantee it must be negative.
    Parameters:
      `availableCpu` - available CPU on the cluster.
      `availableMemory` - available memory on the cluster.
      `td` - the topology we are looking at.
    Returns:
      the score.

  - ### getScore

    public double getScore(double availableCpu, double availableMemory)