Enum ManagedMemoryUtils
- java.lang.Object
-
- java.lang.Enum<ManagedMemoryUtils>
-
- org.apache.flink.runtime.util.config.memory.ManagedMemoryUtils
-
- All Implemented Interfaces:
Serializable,Comparable<ManagedMemoryUtils>
public enum ManagedMemoryUtils extends Enum<ManagedMemoryUtils>
Utils for configuration and calculations related to managed memory and its various use cases.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static doubleconvertToFractionOfSlot(org.apache.flink.core.memory.ManagedMemoryUseCase useCase, double fractionOfUseCase, Set<org.apache.flink.core.memory.ManagedMemoryUseCase> allUseCases, org.apache.flink.configuration.Configuration jobConfig, org.apache.flink.configuration.Configuration clusterConfig, Optional<Boolean> stateBackendFromApplicationUsesManagedMemory, ClassLoader classLoader)static doublegetFractionRoundedDown(long dividend, long divisor)static voidvalidateUseCaseWeightsNotConflict(Map<org.apache.flink.core.memory.ManagedMemoryUseCase,Integer> weights1, Map<org.apache.flink.core.memory.ManagedMemoryUseCase,Integer> weights2)static ManagedMemoryUtilsvalueOf(String name)Returns the enum constant of this type with the specified name.static ManagedMemoryUtils[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Method Detail
-
values
public static ManagedMemoryUtils[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ManagedMemoryUtils c : ManagedMemoryUtils.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ManagedMemoryUtils valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
convertToFractionOfSlot
public static double convertToFractionOfSlot(org.apache.flink.core.memory.ManagedMemoryUseCase useCase, double fractionOfUseCase, Set<org.apache.flink.core.memory.ManagedMemoryUseCase> allUseCases, org.apache.flink.configuration.Configuration jobConfig, org.apache.flink.configuration.Configuration clusterConfig, Optional<Boolean> stateBackendFromApplicationUsesManagedMemory, ClassLoader classLoader)
-
getFractionRoundedDown
public static double getFractionRoundedDown(long dividend, long divisor)
-
-