This is an automated email from the ASF dual-hosted git repository. twalthr pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/flink.git
commit abc1e0a1ffbc907ffb1ce56c504dfbc6bf0357d6 Author: Dawid Wysakowicz <dwysakow...@apache.org> AuthorDate: Mon Jul 29 14:05:41 2019 +0200 [FLINK-13399][table] Create two separate table uber jars for old and blink planners --- flink-dist/pom.xml | 7 +++++++ flink-dist/src/main/assemblies/bin.xml | 15 ++++++++++++++ flink-dist/src/main/assemblies/opt.xml | 8 -------- .../main/flink-bin/bin/pyflink-gateway-server.sh | 2 +- .../flink-stream-sql-test/pom.xml | 6 ------ .../test-scripts/test_streaming_sql.sh | 3 --- .../start-script/start-scala-shell.sh | 7 ------- flink-table/flink-sql-client/pom.xml | 12 ----------- flink-table/flink-table-planner/pom.xml | 2 +- flink-table/flink-table-runtime-blink/pom.xml | 7 +++++++ .../pom.xml | 23 +++++++++++++++++----- flink-table/flink-table-uber/pom.xml | 6 ++++++ flink-table/pom.xml | 1 + tools/travis_controller.sh | 2 +- 14 files changed, 57 insertions(+), 44 deletions(-) diff --git a/flink-dist/pom.xml b/flink-dist/pom.xml index d14cc63..1e80eaa 100644 --- a/flink-dist/pom.xml +++ b/flink-dist/pom.xml @@ -301,6 +301,13 @@ under the License. <dependency> <groupId>org.apache.flink</groupId> + <artifactId>flink-table-uber-blink_${scala.binary.version}</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>org.apache.flink</groupId> <artifactId>flink-sql-client_${scala.binary.version}</artifactId> <version>${project.version}</version> <scope>provided</scope> diff --git a/flink-dist/src/main/assemblies/bin.xml b/flink-dist/src/main/assemblies/bin.xml index 869cffa..7289153 100644 --- a/flink-dist/src/main/assemblies/bin.xml +++ b/flink-dist/src/main/assemblies/bin.xml @@ -52,6 +52,21 @@ under the License. <fileMode>0644</fileMode> </file> + <!-- Table/SQL Uber JAR --> + <file> + <source>../flink-table/flink-table-uber/target/flink-table-uber_${scala.binary.version}-${project.version}.jar</source> + <outputDirectory>lib/</outputDirectory> + <destName>flink-table_${scala.binary.version}-${project.version}.jar</destName> + <fileMode>0644</fileMode> + </file> + + <file> + <source>../flink-table/flink-table-uber-blink/target/flink-table-uber-blink_${scala.binary.version}-${project.version}.jar</source> + <outputDirectory>lib/</outputDirectory> + <destName>flink-table-blink_${scala.binary.version}-${project.version}.jar</destName> + <fileMode>0644</fileMode> + </file> + <!-- copy the config file --> <file> <source>src/main/resources/flink-conf.yaml</source> diff --git a/flink-dist/src/main/assemblies/opt.xml b/flink-dist/src/main/assemblies/opt.xml index b2f989a..e2dbd65 100644 --- a/flink-dist/src/main/assemblies/opt.xml +++ b/flink-dist/src/main/assemblies/opt.xml @@ -59,14 +59,6 @@ <fileMode>0644</fileMode> </file> - <!-- Table/SQL Uber JAR --> - <file> - <source>../flink-table/flink-table-uber/target/flink-table-uber_${scala.binary.version}-${project.version}.jar</source> - <outputDirectory>opt/</outputDirectory> - <destName>flink-table_${scala.binary.version}-${project.version}.jar</destName> - <fileMode>0644</fileMode> - </file> - <!-- SQL Client --> <file> <source>../flink-table/flink-sql-client/target/flink-sql-client_${scala.binary.version}-${project.version}.jar</source> diff --git a/flink-dist/src/main/flink-bin/bin/pyflink-gateway-server.sh b/flink-dist/src/main/flink-bin/bin/pyflink-gateway-server.sh index ce79f1a..16fe6b3 100644 --- a/flink-dist/src/main/flink-bin/bin/pyflink-gateway-server.sh +++ b/flink-dist/src/main/flink-bin/bin/pyflink-gateway-server.sh @@ -50,7 +50,7 @@ done log=$FLINK_LOG_DIR/flink-$FLINK_IDENT_STRING-python-$HOSTNAME.log log_setting=(-Dlog.file="$log" -Dlog4j.configuration=file:"$FLINK_CONF_DIR"/log4j-cli.properties -Dlogback.configurationFile=file:"$FLINK_CONF_DIR"/logback.xml) -TABLE_JAR_PATH=`echo "$FLINK_HOME"/opt/flink-table*.jar` +TABLE_JAR_PATH=`echo "$FLINK_HOME"/lib/flink-table*.jar` PYTHON_JAR_PATH=`echo "$FLINK_HOME"/opt/flink-python*.jar` FLINK_TEST_CLASSPATH="" diff --git a/flink-end-to-end-tests/flink-stream-sql-test/pom.xml b/flink-end-to-end-tests/flink-stream-sql-test/pom.xml index f478867..53c947d 100644 --- a/flink-end-to-end-tests/flink-stream-sql-test/pom.xml +++ b/flink-end-to-end-tests/flink-stream-sql-test/pom.xml @@ -49,12 +49,6 @@ <version>${project.version}</version> <scope>provided</scope> </dependency> - <dependency> - <groupId>org.apache.flink</groupId> - <artifactId>flink-table-planner_${scala.binary.version}</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> </dependencies> <build> diff --git a/flink-end-to-end-tests/test-scripts/test_streaming_sql.sh b/flink-end-to-end-tests/test-scripts/test_streaming_sql.sh index afc9bb3..bfae7d5 100755 --- a/flink-end-to-end-tests/test-scripts/test_streaming_sql.sh +++ b/flink-end-to-end-tests/test-scripts/test_streaming_sql.sh @@ -21,9 +21,6 @@ source "$(dirname "$0")"/common.sh TEST_PROGRAM_JAR=${END_TO_END_DIR}/flink-stream-sql-test/target/StreamSQLTestProgram.jar -# copy flink-table jar into lib folder -add_optional_lib "table" - start_cluster $FLINK_DIR/bin/taskmanager.sh start $FLINK_DIR/bin/taskmanager.sh start diff --git a/flink-scala-shell/start-script/start-scala-shell.sh b/flink-scala-shell/start-script/start-scala-shell.sh index 96ca805..b6da81a 100644 --- a/flink-scala-shell/start-script/start-scala-shell.sh +++ b/flink-scala-shell/start-script/start-scala-shell.sh @@ -52,13 +52,6 @@ bin=`cd "$bin"; pwd` FLINK_CLASSPATH=`constructFlinkClassPath` -# Append flink-table jar into class path -opt=`dirname "$0"` -opt=`cd "$opt"/../opt; pwd` -FLINK_TABLE_LIB_PATH=$opt/`ls $opt|grep flink-table_*` -FLINK_CLASSPATH=$FLINK_CLASSPATH:$FLINK_TABLE_LIB_PATH - - # https://issues.scala-lang.org/browse/SI-6502, cant load external jars interactively # in scala shell since 2.10, has to be done at startup # checks arguments for additional classpath and adds it to the "standard classpath" diff --git a/flink-table/flink-sql-client/pom.xml b/flink-table/flink-sql-client/pom.xml index 8e640ff..f725ff0 100644 --- a/flink-table/flink-sql-client/pom.xml +++ b/flink-table/flink-sql-client/pom.xml @@ -59,12 +59,6 @@ under the License. <version>${project.version}</version> </dependency> - <dependency> - <groupId>org.apache.flink</groupId> - <artifactId>flink-cep_${scala.binary.version}</artifactId> - <version>${project.version}</version> - </dependency> - <!-- Table ecosystem --> <dependency> <groupId>org.apache.flink</groupId> @@ -515,12 +509,6 @@ under the License. <configuration> <artifactSet> <includes combine.children="append"> - <include>org.apache.flink:flink-table-common</include> - <include>org.apache.flink:flink-table-api-java</include> - <include>org.apache.flink:flink-table-api-java-bridge_${scala.binary.version}</include> - <include>org.apache.flink:flink-table-planner_${scala.binary.version}</include> - <include>org.apache.flink:flink-cep_${scala.binary.version}</include> - <include>org.apache.flink:flink-sql-parser</include> <include>org.jline:*</include> </includes> </artifactSet> diff --git a/flink-table/flink-table-planner/pom.xml b/flink-table/flink-table-planner/pom.xml index 14aa966..c1f8a1f 100644 --- a/flink-table/flink-table-planner/pom.xml +++ b/flink-table/flink-table-planner/pom.xml @@ -130,7 +130,6 @@ under the License. <scope>provided</scope> </dependency> - <!-- Used for code generation --> <dependency> <groupId>org.apache.flink</groupId> <artifactId>flink-cep_${scala.binary.version}</artifactId> @@ -138,6 +137,7 @@ under the License. <scope>provided</scope> </dependency> + <!-- Used for code generation --> <dependency> <groupId>org.codehaus.janino</groupId> <artifactId>janino</artifactId> diff --git a/flink-table/flink-table-runtime-blink/pom.xml b/flink-table/flink-table-runtime-blink/pom.xml index f16d5a2..52891a9 100644 --- a/flink-table/flink-table-runtime-blink/pom.xml +++ b/flink-table/flink-table-runtime-blink/pom.xml @@ -170,6 +170,13 @@ under the License. <include>org.lz4:lz4-java</include> </includes> </artifactSet> + <relocations> + <relocation> + <!-- Relocate org.lz4:lz4-java --> + <pattern>net.jpountz</pattern> + <shadedPattern>org.apache.flink.table.shaded.net.jpountz</shadedPattern> + </relocation> + </relocations> </configuration> </execution> </executions> diff --git a/flink-table/flink-table-uber/pom.xml b/flink-table/flink-table-uber-blink/pom.xml similarity index 78% copy from flink-table/flink-table-uber/pom.xml copy to flink-table/flink-table-uber-blink/pom.xml index c5f61f0..ffd40a4 100644 --- a/flink-table/flink-table-uber/pom.xml +++ b/flink-table/flink-table-uber-blink/pom.xml @@ -27,11 +27,12 @@ under the License. <relativePath>..</relativePath> </parent> - <artifactId>flink-table-uber_${scala.binary.version}</artifactId> - <name>flink-table-uber</name> + <artifactId>flink-table-uber-blink_${scala.binary.version}</artifactId> + <name>flink-table-uber-blink</name> <description> This module contains the entire Table/SQL distribution for writing table programs - within the table ecosystem or between other Flink APIs. Users can either use the + within the table ecosystem or between other Flink APIs. This module uses the Blink planner + for generating optimized runnable plan from relational query. Users can either use the Scala or Java programming language. </description> @@ -70,7 +71,17 @@ under the License. </dependency> <dependency> <groupId>org.apache.flink</groupId> - <artifactId>flink-table-planner_${scala.binary.version}</artifactId> + <artifactId>flink-table-planner-blink_${scala.binary.version}</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.flink</groupId> + <artifactId>flink-table-runtime-blink_${scala.binary.version}</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.flink</groupId> + <artifactId>flink-cep_${scala.binary.version}</artifactId> <version>${project.version}</version> </dependency> </dependencies> @@ -97,7 +108,9 @@ under the License. <include>org.apache.flink:flink-table-api-scala_${scala.binary.version}</include> <include>org.apache.flink:flink-table-api-java-bridge_${scala.binary.version}</include> <include>org.apache.flink:flink-table-api-scala-bridge_${scala.binary.version}</include> - <include>org.apache.flink:flink-table-planner_${scala.binary.version}</include> + <include>org.apache.flink:flink-table-planner-blink_${scala.binary.version}</include> + <include>org.apache.flink:flink-table-runtime-blink_${scala.binary.version}</include> + <include>org.apache.flink:flink-cep_${scala.binary.version}</include> </includes> </artifactSet> </configuration> diff --git a/flink-table/flink-table-uber/pom.xml b/flink-table/flink-table-uber/pom.xml index c5f61f0..aa2c434 100644 --- a/flink-table/flink-table-uber/pom.xml +++ b/flink-table/flink-table-uber/pom.xml @@ -73,6 +73,11 @@ under the License. <artifactId>flink-table-planner_${scala.binary.version}</artifactId> <version>${project.version}</version> </dependency> + <dependency> + <groupId>org.apache.flink</groupId> + <artifactId>flink-cep_${scala.binary.version}</artifactId> + <version>${project.version}</version> + </dependency> </dependencies> <build> @@ -98,6 +103,7 @@ under the License. <include>org.apache.flink:flink-table-api-java-bridge_${scala.binary.version}</include> <include>org.apache.flink:flink-table-api-scala-bridge_${scala.binary.version}</include> <include>org.apache.flink:flink-table-planner_${scala.binary.version}</include> + <include>org.apache.flink:flink-cep_${scala.binary.version}</include> </includes> </artifactSet> </configuration> diff --git a/flink-table/pom.xml b/flink-table/pom.xml index a8e2724..1e479b3 100644 --- a/flink-table/pom.xml +++ b/flink-table/pom.xml @@ -42,6 +42,7 @@ under the License. <module>flink-table-planner-blink</module> <module>flink-table-runtime-blink</module> <module>flink-table-uber</module> + <module>flink-table-uber-blink</module> <module>flink-sql-client</module> <module>flink-sql-parser</module> </modules> diff --git a/tools/travis_controller.sh b/tools/travis_controller.sh index 211551d..3f3f5d8 100755 --- a/tools/travis_controller.sh +++ b/tools/travis_controller.sh @@ -146,7 +146,7 @@ if [ $STAGE == "$STAGE_COMPILE" ]; then ! -path "$CACHE_FLINK_DIR/flink-runtime/target/flink-runtime*tests.jar" \ ! -path "$CACHE_FLINK_DIR/flink-streaming-java/target/flink-streaming-java*tests.jar" \ ! -path "$CACHE_FLINK_DIR/flink-dist/target/flink-*-bin/flink-*/lib/flink-dist*.jar" \ - ! -path "$CACHE_FLINK_DIR/flink-dist/target/flink-*-bin/flink-*/opt/flink-table*.jar" \ + ! -path "$CACHE_FLINK_DIR/flink-dist/target/flink-*-bin/flink-*/lib/flink-table*.jar" \ ! -path "$CACHE_FLINK_DIR/flink-dist/target/flink-*-bin/flink-*/opt/flink-python*.jar" \ ! -path "$CACHE_FLINK_DIR/flink-connectors/flink-connector-elasticsearch-base/target/flink-*.jar" \ ! -path "$CACHE_FLINK_DIR/flink-connectors/flink-connector-kafka-base/target/flink-*.jar" \