Class ClusterResources

java.lang.Object
com.yahoo.config.provision.ClusterResources

public class ClusterResources extends Object
The resources of a cluster
Author:
bratseth
  • Constructor Details

    • ClusterResources

      public ClusterResources(int nodes, int groups, NodeResources nodeResources)
  • Method Details

    • nodes

      public int nodes()
      Returns the total number of allocated nodes (over all groups)
    • groups

      public int groups()
    • nodeResources

      public NodeResources nodeResources()
    • with

      public ClusterResources with(NodeResources resources)
    • withNodes

      public ClusterResources withNodes(int nodes)
    • withGroups

      public ClusterResources withGroups(int groups)
    • smallerThan

      public boolean smallerThan(ClusterResources other)
      Returns true if this is smaller than the given resources in any dimension
    • isWithin

      public boolean isWithin(ClusterResources min, ClusterResources max)
      Returns true if this is within the given limits (inclusive) and is compatible with them
    • totalResources

      public NodeResources totalResources()
      Returns the total resources of this, that is the number of nodes times the node resources
    • justNumbers

      public ClusterResources justNumbers()
    • cost

      public double cost()
      Returns the standard cost of these resources, in dollars per hour
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object