Class AbsoluteResourceCapacityCalculator
java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.AbstractQueueCapacityCalculator
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.AbsoluteResourceCapacityCalculator
-
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.static voidsetNormalizedResourceRatio(ResourceCalculationDriver calculationDriver) Calculates the normalized resource ratio of a parent queue, under which children are defined with absolute capacity type.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
-
AbsoluteResourceCapacityCalculator
public AbsoluteResourceCapacityCalculator()
-
-
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
-
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
-
getCapacityType
Description copied from class:AbstractQueueCapacityCalculatorReturns the capacity type the calculator could handle.- Specified by:
getCapacityTypein classAbstractQueueCapacityCalculator- Returns:
- capacity type
-
setNormalizedResourceRatio
Calculates the normalized resource ratio of a parent queue, under which children are defined with absolute capacity type. If the effective resource of the parent is less, than the aggregated configured absolute resource of its children, the resource ratio will be less, than 1.- Parameters:
calculationDriver- the driver, which contains the parent queue that will form the base of the normalization calculation
-