public class SupervisorResources extends Object
Constructor and Description |
---|
SupervisorResources(double totalMem,
double totalCpu,
Map<String,Double> totalGenericResources,
double usedMem,
double usedCpu,
Map<String,Double> usedGenericResources)
Constructor for a Supervisor’s resources.
|
Modifier and Type | Method and 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() |
public SupervisorResources(double totalMem, double totalCpu, Map<String,Double> totalGenericResources, double usedMem, double usedCpu, Map<String,Double> usedGenericResources)
Constructor for a Supervisor’s resources.
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 supervisorpublic double getUsedMem()
public double getUsedCpu()
public double getTotalMem()
public double getTotalCpu()
public double getAvailableCpu()
public double getAvailableMem()
public SupervisorResources add(WorkerResources wr)
public SupervisorResources addMem(Double value)
Copyright © 2022 The Apache Software Foundation. All rights reserved.