Package org.apache.storm.daemon.nimbus
Class TopologyResources
java.lang.Object
org.apache.storm.daemon.nimbus.TopologyResources
-
Constructor Summary
ModifierConstructorDescriptionprotected
TopologyResources
(double requestedMemOnHeap, double requestedMemOffHeap, double requestedSharedMemOnHeap, double requestedSharedMemOffHeap, double requestedNonSharedMemOnHeap, double requestedNonSharedMemOffHeap, double requestedCpu, Map<String, Double> requestedGenericResources, double assignedMemOnHeap, double assignedMemOffHeap, double assignedSharedMemOnHeap, double assignedSharedMemOffHeap, double assignedNonSharedMemOnHeap, double assignedNonSharedMemOffHeap, double assignedCpu, Map<String, Double> assignedGenericResources) TopologyResources
(TopologyDetails td, Assignment assignment) TopologyResources
(TopologyDetails td, SchedulerAssignment assignment) -
Method Summary
Modifier and TypeMethodDescriptionadd
(TopologyResources other) Add the values in other to this and return a combined resources object.double
double
double
double
double
double
double
double
double
double
double
double
double
double
void
setAssignedCpu
(double assignedCpu) void
setAssignedMemOffHeap
(double assignedMemOffHeap) void
setAssignedMemOnHeap
(double assignedMemOnHeap) void
setAssignedNonSharedMemOffHeap
(double assignedNonSharedMemOffHeap) void
setAssignedNonSharedMemOnHeap
(double assignedNonSharedMemOnHeap) void
setAssignedSharedMemOffHeap
(double assignedSharedMemOffHeap) void
setAssignedSharedMemOnHeap
(double assignedSharedMemOnHeap)
-
Constructor Details
-
TopologyResources
-
TopologyResources
-
TopologyResources
public TopologyResources() -
TopologyResources
protected TopologyResources(double requestedMemOnHeap, double requestedMemOffHeap, double requestedSharedMemOnHeap, double requestedSharedMemOffHeap, double requestedNonSharedMemOnHeap, double requestedNonSharedMemOffHeap, double requestedCpu, Map<String, Double> requestedGenericResources, double assignedMemOnHeap, double assignedMemOffHeap, double assignedSharedMemOnHeap, double assignedSharedMemOffHeap, double assignedNonSharedMemOnHeap, double assignedNonSharedMemOffHeap, double assignedCpu, Map<String, Double> assignedGenericResources)
-
-
Method Details
-
getRequestedMemOnHeap
public double getRequestedMemOnHeap() -
getRequestedMemOffHeap
public double getRequestedMemOffHeap() -
getRequestedCpu
public double getRequestedCpu() -
getAssignedMemOnHeap
public double getAssignedMemOnHeap() -
setAssignedMemOnHeap
public void setAssignedMemOnHeap(double assignedMemOnHeap) -
getAssignedMemOffHeap
public double getAssignedMemOffHeap() -
setAssignedMemOffHeap
public void setAssignedMemOffHeap(double assignedMemOffHeap) -
getAssignedCpu
public double getAssignedCpu() -
setAssignedCpu
public void setAssignedCpu(double assignedCpu) -
getAssignedGenericResources
-
getRequestedGenericResources
-
add
Add the values in other to this and return a combined resources object.- Parameters:
other
- the other resources to add to this- Returns:
- the combined resources with the sum of the values in each.
-