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 SummaryFieldsModifier and TypeFieldDescriptiondoubleAmongst allavailableResources, this is the average ratio of resource to the total available in group.final StringdoubleAmongst allavailableResources, this is the minimum ratio of resource to the total available in group.
- 
Constructor SummaryConstructorsConstructorDescriptionObjectResourcesItem(String id, NormalizedResourceOffer availableResources, NormalizedResourceOffer totalResources, double minResourcePercent, double avgResourcePercent) 
- 
Method Summary
- 
Field Details- 
id
- 
availableResources
- 
totalResources
- 
minResourcePercentpublic 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 NodeSorterwhere value is calculated byObjectResourcesSummary.getAvailableResourcesOverall()usingNormalizedResourceOffer.calculateMinPercentageUsedBy(NormalizedResourceOffer).
- 
avgResourcePercentpublic 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 NodeSorterwhere value is calculated byObjectResourcesSummary.getAvailableResourcesOverall()usingNormalizedResourceOffer.calculateAveragePercentageUsedBy(NormalizedResourceOffer).
 
- 
- 
Constructor Details- 
ObjectResourcesItem
- 
ObjectResourcesItem
- 
ObjectResourcesItempublic ObjectResourcesItem(String id, NormalizedResourceOffer availableResources, NormalizedResourceOffer totalResources, double minResourcePercent, double avgResourcePercent) 
 
- 
- 
Method Details