Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.14.3
-
None
-
None
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:
- ProgramOptions#applyToConfiguration will use a list which size is zero to overwrite 'pipeline.classpaths' value in configuration.
- 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.