JingsongLi commented on a change in pull request #10396: [FLINK-14063][table-planner-blink] Operators use fractions to decide how many managed memory to allocate URL: https://github.com/apache/flink/pull/10396#discussion_r353568214
########## File path: flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/operators/TableStreamOperator.java ########## @@ -46,4 +47,13 @@ public void dispose() throws Exception { super.dispose(); } + /** + * Compute memory size from memory faction. + */ + public long computeMemorySize() { + double memFraction = getOperatorConfig().getManagedMemoryFractionOnHeap() + + getOperatorConfig().getManagedMemoryFractionOffHeap(); + MemoryManager memManager = getContainingTask().getEnvironment().getMemoryManager(); + return ((long) memManager.computeNumberOfPages(memFraction)) * memManager.getPageSize(); Review comment: Good to know `MemoryManager#computeMemorySize` has to be introduced. ---------------------------------------------------------------- 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 With regards, Apache Git Services