Class ObjectResourcesItem
java.lang.Object
org.apache.storm.scheduler.resource.strategies.scheduling.ObjectResourcesItem
class to keep track of resources on a rack or node.
-
Field Summary
Modifier and TypeFieldDescriptiondouble
Amongst allavailableResources
, this is the average ratio of resource to the total available in group.final String
double
Amongst allavailableResources
, this is the minimum ratio of resource to the total available in group. -
Constructor Summary
ConstructorDescriptionObjectResourcesItem
(String id, NormalizedResourceOffer availableResources, NormalizedResourceOffer totalResources, double minResourcePercent, double avgResourcePercent) -
Method Summary
-
Field Details
-
id
-
availableResources
-
totalResources
-
minResourcePercent
public double minResourcePercentAmongst allavailableResources
, this is the minimum ratio of resource to the total available in group. Note that nodes are grouped into hosts. Hosts into racks. And racks are grouped under the cluster.An example of this calculation is in
NodeSorter
where value is calculated byObjectResourcesSummary.getAvailableResourcesOverall()
usingNormalizedResourceOffer.calculateMinPercentageUsedBy(NormalizedResourceOffer)
. -
avgResourcePercent
public double avgResourcePercentAmongst allavailableResources
, this is the average ratio of resource to the total available in group. Note that nodes are grouped into hosts, hosts into racks, and racks are grouped under the cluster.An example of this calculation is in
NodeSorter
where value is calculated byObjectResourcesSummary.getAvailableResourcesOverall()
usingNormalizedResourceOffer.calculateAveragePercentageUsedBy(NormalizedResourceOffer)
.
-
-
Constructor Details
-
ObjectResourcesItem
-
ObjectResourcesItem
-
ObjectResourcesItem
public ObjectResourcesItem(String id, NormalizedResourceOffer availableResources, NormalizedResourceOffer totalResources, double minResourcePercent, double avgResourcePercent)
-
-
Method Details