You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/12/05 03:09:32 UTC

[GitHub] [flink] KurtYoung commented on a change in pull request #10396: [FLINK-14063][table-planner-blink] Operators use fractions to decide how many managed memory to allocate

KurtYoung 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_r354090736
 
 

 ##########
 File path: flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/operators/join/SortMergeJoinOperator.java
 ##########
 @@ -158,16 +140,26 @@ public void open() throws Exception {
 		this.memManager = this.getContainingTask().getEnvironment().getMemoryManager();
 		this.ioManager = this.getContainingTask().getEnvironment().getIOManager();
 
+		long totalMemory = computeMemorySize();
+		long totalSortMem = totalMemory - externalBufferMemory;
+		if (totalSortMem < 0) {
+			throw new TableException("Memory size is too small: " +
+					totalMemory + ", please increase manage memory of task manager.");
+		}
+
+		long sortMemory1 = (long) (totalSortMem * leftMemRatio);
 
 Review comment:
   Should we also check the minimum memory for sorter?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services