Package org.apache.storm.scheduler
Class SupervisorResources
- java.lang.Object
-
- org.apache.storm.scheduler.SupervisorResources
-
public class SupervisorResources extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SupervisorResources
add(WorkerResources wr)
SupervisorResources
addMem(Double value)
double
getAvailableCpu()
double
getAvailableMem()
double
getTotalCpu()
Map<String,Double>
getTotalGenericResources()
double
getTotalMem()
double
getUsedCpu()
Map<String,Double>
getUsedGenericResources()
double
getUsedMem()
-
-
-
Constructor Detail
-
SupervisorResources
public SupervisorResources(double totalMem, double totalCpu, Map<String,Double> totalGenericResources, double usedMem, double usedCpu, Map<String,Double> usedGenericResources)
Constructor for a Supervisor's resources.- Parameters:
totalMem
- the total mem on the supervisortotalCpu
- the total CPU on the supervisortotalGenericResources
- the total generic resources on the supervisorusedMem
- the used mem on the supervisorusedCpu
- the used CPU on the supervisorusedGenericResources
- the used generic resources on the supervisor
-
-
Method Detail
-
getUsedMem
public double getUsedMem()
-
getUsedCpu
public double getUsedCpu()
-
getTotalMem
public double getTotalMem()
-
getTotalCpu
public double getTotalCpu()
-
getAvailableCpu
public double getAvailableCpu()
-
getAvailableMem
public double getAvailableMem()
-
add
public SupervisorResources add(WorkerResources wr)
-
addMem
public SupervisorResources addMem(Double value)
-
-