Github user NicoK commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4506#discussion_r147657947
  
    --- 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!
    +                           "-yD", "taskmanager.memory.preallocate=true", 
exampleJarLocation.getAbsolutePath()},
    +                           /* test succeeded after this string */
    +                   "Job execution complete",
    +                   /* prohibited strings: (we want to see "DataSink (...) 
(2/2) switched to FINISHED") */
    +                   new String[]{"DataSink \\(.*\\) \\(1/1\\) switched to 
FINISHED"},
    --- End diff --
    
    that was copied from the `perJobYarnCluster()` test this is based on and 
from my interpretation, I'd say, "`(1/1)` is prohibited but we should see 
`(2/2)`" is the correct way of interpreting this comment


---

Reply via email to