Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-25834

'flink run' command can not use 'pipeline.classpaths' in flink-conf.yaml

    XMLWordPrintableJSON

Details

    Description

      When we use 'flink run' or CliFrontend class to submit job. If not set -C/-classpaths, it disable 'pipeline.classpaths'.

      Example:

       flink-conf.yaml content :

      pipeline.classpaths: file:///opt/flink-1.14.2/other/flink-sql-connector-elasticsearch7_2.12-1.14.2.jar

      submit command:

      bin/flink run /flink14-sql/target/flink14-sql-1.0-SNAPSHOT-jar-with-dependencies.jar

      It will throw elasticsearch7 class not found exception.

      There are two reasons for this:

      1. ProgramOptions#applyToConfiguration will use a list which size is zero to overwrite 'pipeline.classpaths' value in configuration.
      2. ProgramOptions#buildProgram do not set 'pipeline.classpaths' into PackagedProgram.

      To solve the 1) problem, could we add a directly return judgement when list size is zero in ConfigUtils#encodeCollectionToConfig()

      To solve the 2) problem, could we append 'pipeline.classpaths' values into classpaths and pass setUserClassPaths together.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ana4 Luning Wang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: