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

    https://github.com/apache/flink/pull/5766#discussion_r177843186
  
    --- Diff: 
flink-formats/flink-avro/src/test/java/org/apache/flink/formats/avro/AvroExternalJarProgramITCase.java
 ---
    @@ -44,49 +39,24 @@
     
        private static final String TEST_DATA_FILE = "/testdata.avro";
     
    -   @Test
    -   public void testExternalProgram() {
    -
    -           LocalFlinkMiniCluster testMiniCluster = null;
    +   private static final MiniClusterResource miniClusterResource = new 
MiniClusterResource(
    +           new MiniClusterResource.MiniClusterResourceConfiguration(
    +                   new Configuration(),
    +                   1,
    +                   4));
     
    +   @Test
    +   public void testExternalProgram() throws Exception {
    +           miniClusterResource.setJarFiles(Collections.singleton(new 
Path(JAR_FILE)));
    --- End diff --
    
    The jar passed to the `PackagedProgram` is only used to create the 
classloader for loading the contained classes.
    
    The jars have to be explicitly added to the JobGraph, which we here do by 
passing it to the environment that does it for us. In the CLI, we use 
[PackagedProgramUtils](https://github.com/apache/flink/blob/master/flink-clients/src/main/java/org/apache/flink/client/program/PackagedProgramUtils.java)
 to retrieve the jars from the PackagedProgram and register them on the 
jobgraph.


---

Reply via email to