KarmaGYZ commented on a change in pull request #13397: URL: https://github.com/apache/flink/pull/13397#discussion_r489294355
########## File path: flink-core/src/main/java/org/apache/flink/api/dag/Transformation.java ########## @@ -139,12 +142,12 @@ public static int getNewNodeId() { private ResourceSpec preferredResources = ResourceSpec.DEFAULT; /** - * This weight indicates how much this transformation relies on managed memory, so that - * transformation highly relies on managed memory would be able to acquire more managed - * memory in runtime (linear association). Note that it only works in cases of UNKNOWN - * resources. + * Each entry in this map represents a use case that this transformation needs managed memory for. The key of the + * entry indicates the use case, while the value is the use-case-specific weight for this transformation. Managed + * memory reserved for an OPERATOR scope use case will be shared by all the declaring transformations within a slot + * according to this weight. For SLOT scope use cases, the weights are ignored. */ - private int managedMemoryWeight = DEFAULT_MANAGED_MEMORY_WEIGHT; + private final Map<ManagedMemoryUseCase, Integer> managedMemoryUseCaseWeights = new HashMap<>(); Review comment: Just trying to understand, is it illegal to put `ROCKSDB` or `PYTHON` in this map in your design? If so, should we check the sanity if someone tries to put `ROCKSDB` or `PYTHON` in? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org