Github user tillrohrmann commented on a diff in the pull request:
https://github.com/apache/flink/pull/4506#discussion_r146479686
--- Diff:
flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionCapacitySchedulerITCase.java
---
@@ -132,6 +132,36 @@ public void perJobYarnCluster() {
}
/**
+ * Test per-job yarn cluster and memory calculations for off-heap use
(see FLINK-7400).
+ *
+ * <p>This also tests the prefixed CliFrontend options for the YARN case
+ * We also test if the requested parallelism of 2 is passed through.
+ * The parallelism is requested at the YARN client (-ys).
+ */
+ @Test
+ public void perJobYarnClusterOffHeap() {
+ LOG.info("Starting perJobYarnCluster()");
+ addTestAppender(JobClient.class, Level.INFO);
+ File exampleJarLocation = new
File("target/programs/BatchWordCount.jar");
+ Assert.assertNotNull("Could not find wordcount jar",
exampleJarLocation);
+ runWithArgs(new String[]{"run", "-m", "yarn-cluster",
+ "-yj", flinkUberjar.getAbsolutePath(), "-yt",
flinkLibFolder.getAbsolutePath(),
+ "-yn", "1",
+ "-ys", "2", //test that the job is executed
with a DOP of 2
+ "-yjm", "768",
+ "-ytm", "1024",
+ "-yD", "taskmanager.memory.off-heap=true",
+ "-yD", "taskmanager.memory.size=246", // this
should fit!
--- End diff --
Could you add some explanation why this fits now and not before?
---