Package org.apache.heron.spi.packing
Class PackingPlan
- java.lang.Object
-
- org.apache.heron.spi.packing.PackingPlan
-
public class PackingPlan extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PackingPlan.ContainerPlan
static class
PackingPlan.InstancePlan
-
Constructor Summary
Constructors Constructor Description PackingPlan(String id, Set<PackingPlan.ContainerPlan> containers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PackingPlan
cloneWithHomogeneousScheduledResource()
Creates a clone ofPackingPlan
.boolean
equals(Object o)
Map<String,Integer>
getComponentCounts()
Return a map containing the count of all of the components, keyed by nameString
getComponentRamDistribution()
Get the formatted String describing component RAM distribution from PackingPlan, used by executorcom.google.common.base.Optional<PackingPlan.ContainerPlan>
getContainer(int containerId)
Set<PackingPlan.ContainerPlan>
getContainers()
Map<Integer,PackingPlan.ContainerPlan>
getContainersMap()
String
getId()
Integer
getInstanceCount()
Resource
getMaxContainerResources()
Computes the maximum of all the resources required by the containers in the packing plan.int
hashCode()
String
toString()
-
-
-
Constructor Detail
-
PackingPlan
public PackingPlan(String id, Set<PackingPlan.ContainerPlan> containers)
-
-
Method Detail
-
getMaxContainerResources
public Resource getMaxContainerResources()
Computes the maximum of all the resources required by the containers in the packing plan. If the PackingPlan has already been scheduled, the scheduled resources will be used over the required resources.- Returns:
- maximum Resources found in all containers.
-
cloneWithHomogeneousScheduledResource
public PackingPlan cloneWithHomogeneousScheduledResource()
Creates a clone ofPackingPlan
. It also computes the maximum of all the resources required by containers in the packing plan and updates the containers of the clone with the max resource information
-
getId
public String getId()
-
getContainers
public Set<PackingPlan.ContainerPlan> getContainers()
-
getContainersMap
public Map<Integer,PackingPlan.ContainerPlan> getContainersMap()
-
getContainer
public com.google.common.base.Optional<PackingPlan.ContainerPlan> getContainer(int containerId)
-
getInstanceCount
public Integer getInstanceCount()
-
getComponentCounts
public Map<String,Integer> getComponentCounts()
Return a map containing the count of all of the components, keyed by name
-
getComponentRamDistribution
public String getComponentRamDistribution()
Get the formatted String describing component RAM distribution from PackingPlan, used by executor- Returns:
- String describing component RAM distribution
-
-