zentol commented on a change in pull request #10200: [FLINK-14062][runtime]
Calculate managed memory fraction based on slot sharing groups
URL: https://github.com/apache/flink/pull/10200#discussion_r346882905
##########
File path:
flink-streaming-java/src/test/java/org/apache/flink/streaming/api/graph/StreamingJobGraphGeneratorTest.java
##########
@@ -657,6 +660,117 @@ public void
testNotSupportInputSelectableOperatorIfCheckpointing() {
StreamingJobGraphGenerator.createJobGraph(env.getStreamGraph());
}
+ @Test
+ public void testManagedMemoryFractionForSpecifiedResourceSpec() throws
Exception {
+ final ResourceSpec resource1 = ResourceSpec.newBuilder(1, 100)
+ .setOnHeapManagedMemory(new MemorySize(100))
+ .setOffHeapManagedMemory(new MemorySize(40))
+ .build();
+ final ResourceSpec resource2 = ResourceSpec.newBuilder(1, 100)
+ .setOnHeapManagedMemory(new MemorySize(300))
+ .setOffHeapManagedMemory(new MemorySize(50))
+ .build();
+ final ResourceSpec resource3 = ResourceSpec.newBuilder(1, 100)
+ .setOnHeapManagedMemory(new MemorySize(600))
+ .setOffHeapManagedMemory(new MemorySize(10))
+ .build();
+ final ResourceSpec resource4 = ResourceSpec.newBuilder(1, 100)
+ .setOnHeapManagedMemory(new MemorySize(123))
+ .setOffHeapManagedMemory(new MemorySize(456))
+ .build();
+
+ // v1, v2 are in the same slot sharing group, v3 is in a
different group
Review comment:
let's add this comment to the other test as well
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services