Class WeightQueueCapacityCalculator
java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.AbstractQueueCapacityCalculator
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.WeightQueueCapacityCalculator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublecalculateMaximumResource(ResourceCalculationDriver resourceCalculationDriver, CalculationContext context, String label) Calculates the maximum effective resource.doublecalculateMinimumResource(ResourceCalculationDriver resourceCalculationDriver, CalculationContext context, String label) Calculates the minimum effective resource.voidcalculateResourcePrerequisites(ResourceCalculationDriver resourceCalculationDriver) Executes all logic that must be called prior to the effective resource value calculations.Returns the capacity type the calculator could handle.voidupdateCapacitiesAfterCalculation(ResourceCalculationDriver resourceCalculationDriver, CSQueue queue, String label) Sets the metrics and statistics after effective resource values calculation.Methods inherited from class org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.AbstractQueueCapacityCalculator
getResourceNames, getResourceNames
-
Constructor Details
-
WeightQueueCapacityCalculator
public WeightQueueCapacityCalculator()
-
-
Method Details
-
calculateResourcePrerequisites
Description copied from class:AbstractQueueCapacityCalculatorExecutes all logic that must be called prior to the effective resource value calculations.- Specified by:
calculateResourcePrerequisitesin classAbstractQueueCapacityCalculator- Parameters:
resourceCalculationDriver- driver that contains the parent queue on which the prerequisite calculation should be made
-
calculateMinimumResource
public double calculateMinimumResource(ResourceCalculationDriver resourceCalculationDriver, CalculationContext context, String label) Description copied from class:AbstractQueueCapacityCalculatorCalculates the minimum effective resource.- Specified by:
calculateMinimumResourcein classAbstractQueueCapacityCalculator- Parameters:
resourceCalculationDriver- driver that contains the intermediate calculation results for a queue branchcontext- the units evaluated in the current iteration phaselabel- node label- Returns:
- minimum effective resource
-
calculateMaximumResource
public double calculateMaximumResource(ResourceCalculationDriver resourceCalculationDriver, CalculationContext context, String label) Description copied from class:AbstractQueueCapacityCalculatorCalculates the maximum effective resource.- Specified by:
calculateMaximumResourcein classAbstractQueueCapacityCalculator- Parameters:
resourceCalculationDriver- driver that contains the intermediate calculation results for a queue branchcontext- the units evaluated in the current iteration phaselabel- node label- Returns:
- minimum effective resource
-
getCapacityType
Description copied from class:AbstractQueueCapacityCalculatorReturns the capacity type the calculator could handle.- Specified by:
getCapacityTypein classAbstractQueueCapacityCalculator- Returns:
- capacity type
-
updateCapacitiesAfterCalculation
public void updateCapacitiesAfterCalculation(ResourceCalculationDriver resourceCalculationDriver, CSQueue queue, String label) Description copied from class:AbstractQueueCapacityCalculatorSets the metrics and statistics after effective resource values calculation.- Specified by:
updateCapacitiesAfterCalculationin classAbstractQueueCapacityCalculator- Parameters:
resourceCalculationDriver- driver that contains the intermediate calculation results for a queue branchqueue- the queue on which the calculations are basedlabel- node label
-