Package org.apache.storm.scheduler
Class SupervisorResources
java.lang.Object
org.apache.storm.scheduler.SupervisorResources
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionadd
(WorkerResources wr) double
double
double
double
double
double
-
Constructor Details
-
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 Details
-
getUsedMem
public double getUsedMem() -
getUsedCpu
public double getUsedCpu() -
getTotalMem
public double getTotalMem() -
getTotalCpu
public double getTotalCpu() -
getAvailableCpu
public double getAvailableCpu() -
getAvailableMem
public double getAvailableMem() -
getTotalGenericResources
-
getUsedGenericResources
-
add
-
addMem
-