[ZEPPELIN-4544]. Rename zeppelin-interpreter-api to zeppelin-interpreter-shaded

This commit is contained in:
Jeff Zhang 2020-01-07 23:46:20 +08:00
parent be57e343f3
commit 380d8484f3
16 changed files with 205 additions and 24 deletions

View file

@ -109,7 +109,7 @@ matrix:
# Test interpreter modules
- jdk: "openjdk8"
dist: xenial
env: PYTHON="3" R="true" SCALA_VER="2.10" TENSORFLOW="1.13.1" PROFILE="-Pscala-2.10" BUILD_FLAG="install -DskipTests -DskipRat -am" TEST_FLAG="test -DskipRat" MODULES="-pl $(echo .,zeppelin-interpreter,zeppelin-interpreter-api,${INTERPRETERS} | sed 's/!//g')" TEST_PROJECTS=""
env: PYTHON="3" R="true" SCALA_VER="2.10" TENSORFLOW="1.13.1" PROFILE="-Pscala-2.10" BUILD_FLAG="install -DskipTests -DskipRat -am" TEST_FLAG="test -DskipRat" MODULES="-pl $(echo .,zeppelin-interpreter,zeppelin-interpreter-shaded,${INTERPRETERS} | sed 's/!//g')" TEST_PROJECTS=""
# Run Spark integration test and unit test separately for each spark version

View file

@ -231,7 +231,7 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>zeppelin-interpreter-api</artifactId>
<artifactId>zeppelin-interpreter-shaded</artifactId>
<version>${project.version}</version>
</dependency>

View file

@ -69,7 +69,7 @@ fi
. "${bin}/common.sh"
ZEPPELIN_INTERPRETER_API_JAR=$(find "${ZEPPELIN_HOME}/interpreter" -name 'zeppelin-interpreter-api-*.jar')
ZEPPELIN_INTERPRETER_API_JAR=$(find "${ZEPPELIN_HOME}/interpreter" -name 'zeppelin-interpreter-shaded-*.jar')
ZEPPELIN_INTP_CLASSPATH="${CLASSPATH}:${ZEPPELIN_INTERPRETER_API_JAR}"
# construct classpath
@ -83,7 +83,7 @@ if [[ -d "${ZEPPELIN_HOME}/zeppelin-zengine/target/test-classes" ]]; then
addJarInDirForIntp "${ZEPPELIN_HOME}/zeppelin-zengine/target/test-classes"
fi
addJarInDirForIntp "${ZEPPELIN_HOME}/zeppelin-interpreter-api/target"
addJarInDirForIntp "${ZEPPELIN_HOME}/zeppelin-interpreter-shaded/target"
addJarInDirForIntp "${INTERPRETER_DIR}"
HOSTNAME=$(hostname)

View file

@ -54,7 +54,7 @@
<modules>
<module>zeppelin-interpreter-parent</module>
<module>zeppelin-interpreter</module>
<module>zeppelin-interpreter-api</module>
<module>zeppelin-interpreter-shaded</module>
<module>zeppelin-zengine</module>
<module>zeppelin-display</module>
<module>rlang</module>

View file

@ -142,7 +142,7 @@
<!--
shade for python interpreter is different from other interpreter, it depends on zeppelin-interpreter instead of
zeppelin-interpreter-api. Because spark interpreter depends on python interpreter and spark's py4j conflict with python interpreter's py4j.
zeppelin-interpreter-shaded. Because spark interpreter depends on python interpreter and spark's py4j conflict with python interpreter's py4j.
python interpreter would generate 2 versions of jars, one is shaded jar which is used for running python interpreter, another is normal jar
which is used by spark interpreter as dependency.
-->
@ -164,7 +164,7 @@
</transformers>
<artifactSet>
<excludes>
<exclude>org.apache.zeppelin:zeppelin-interpreter-api</exclude>
<exclude>org.apache.zeppelin:zeppelin-interpreter-shaded</exclude>
</excludes>
</artifactSet>
<outputFile>${project.build.directory}/../../interpreter/python/${interpreter.jar.name}-${project.version}.jar</outputFile>

View file

@ -78,7 +78,7 @@
<dependency>
<groupId>org.apache.zeppelin</groupId>
<artifactId>zeppelin-interpreter-api</artifactId>
<artifactId>zeppelin-interpreter-shaded</artifactId>
<version>${project.version}</version>
</dependency>
@ -493,7 +493,7 @@
<exclude>org.scala-lang:scala-reflect</exclude>
<exclude>commons-lang:commons-lang</exclude>
<exclude>org.apache.commons:commons-compress</exclude>
<exclude>org.apache.zeppelin:zeppelin-interpreter-api</exclude>
<exclude>org.apache.zeppelin:zeppelin-interpreter-shaded</exclude>
</excludes>
</artifactSet>

View file

@ -50,7 +50,7 @@
<dependency>
<groupId>org.apache.zeppelin</groupId>
<artifactId>zeppelin-interpreter-api</artifactId>
<artifactId>zeppelin-interpreter-shaded</artifactId>
<version>${project.version}</version>
</dependency>

View file

@ -36,7 +36,7 @@
<dependencies>
<dependency>
<groupId>org.apache.zeppelin</groupId>
<artifactId>zeppelin-interpreter-api</artifactId>
<artifactId>zeppelin-interpreter-shaded</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>

View file

@ -62,7 +62,7 @@
<dependency>
<groupId>org.apache.zeppelin</groupId>
<artifactId>zeppelin-interpreter-api</artifactId>
<artifactId>zeppelin-interpreter-shaded</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>

View file

@ -61,7 +61,7 @@
<dependency>
<groupId>org.apache.zeppelin</groupId>
<artifactId>zeppelin-interpreter-api</artifactId>
<artifactId>zeppelin-interpreter-shaded</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>

View file

@ -36,7 +36,7 @@
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>zeppelin-interpreter-api</artifactId>
<artifactId>zeppelin-interpreter-shaded</artifactId>
<version>${project.version}</version>
</dependency>
@ -112,7 +112,7 @@
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
<exclude>org.apache.zeppelin:zeppelin-interpreter-api</exclude>
<exclude>org.apache.zeppelin:zeppelin-interpreter-shaded</exclude>
</excludes>
</filter>
</filters>
@ -124,7 +124,7 @@
</transformers>
<artifactSet>
<excludes>
<exclude>org.apache.zeppelin:zeppelin-interpreter-api</exclude>
<exclude>org.apache.zeppelin:zeppelin-interpreter-shaded</exclude>
</excludes>
</artifactSet>
<outputFile>${project.basedir}/../interpreter/${interpreter.name}/${project.artifactId}-${project.version}.jar</outputFile>

View file

@ -29,11 +29,11 @@
</parent>
<groupId>org.apache.zeppelin</groupId>
<artifactId>zeppelin-interpreter-api</artifactId>
<artifactId>zeppelin-interpreter-shaded</artifactId>
<packaging>jar</packaging>
<version>0.9.0-SNAPSHOT</version>
<name>Zeppelin: Interpreter API</name>
<description>Zeppelin Interpreter API</description>
<name>Zeppelin: Interpreter Shaded</name>
<description>Zeppelin Interpreter Shaded</description>
<properties>
<!--plugin versions-->
@ -45,7 +45,7 @@
<dependency>
<groupId>org.apache.zeppelin</groupId>
<artifactId>zeppelin-interpreter</artifactId>
<version>${project.version}</version>
<version>0.9.0-SNAPSHOT</version>
<optional>true</optional>
</dependency>
</dependencies>
@ -166,7 +166,7 @@
<target>
<echo>ANT TASK - copying files....</echo>
<copy todir="${project.basedir}/../interpreter" overwrite="true" flatten="true">
<fileset dir="${project.build.directory}" includes="zeppelin-interpreter-api-*.jar" >
<fileset dir="${project.build.directory}" includes="zeppelin-interpreter-shaded-*.jar" >
</fileset>
</copy>
</target>

View file

@ -0,0 +1,181 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to You under the Apache License, Version 2.0
~ (the "License"); you may not use this file except in compliance with
~ the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>zeppelin</artifactId>
<groupId>org.apache.zeppelin</groupId>
<version>0.9.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.apache.zeppelin</groupId>
<artifactId>zeppelin-interpreter-shaded</artifactId>
<packaging>jar</packaging>
<version>0.9.0-SNAPSHOT</version>
<name>Zeppelin: Interpreter Shaded</name>
<description>Zeppelin Interpreter Shaded</description>
<properties>
<!--plugin versions-->
<plugin.shade.version>2.3</plugin.shade.version>
<shaded.dependency.prefix>org.apache.zeppelin.shaded</shaded.dependency.prefix>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.zeppelin</groupId>
<artifactId>zeppelin-interpreter</artifactId>
<version>0.9.0-SNAPSHOT</version>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>${plugin.shade.version}</version>
<configuration>
<artifactSet>
<excludes>
<!-- Leave slf4j unshaded so downstream users can configure logging. -->
<exclude>org.slf4j:slf4j-api</exclude>
<exclude>org.slf4j:slf4j-log4j12</exclude>
<!-- Leave commons-logging unshaded so downstream users can configure logging. -->
<exclude>commons-logging:commons-logging</exclude>
<!-- Leave commons-exec unshaded so downstream users can use ProcessLauncher. -->
<exclude>org.apache.commons:commons-exec</exclude>
<!-- Leave log4j unshaded so downstream users can configure logging. -->
<exclude>log4j:log4j</exclude>
</excludes>
</artifactSet>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>reference.conf</resource>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer"/>
<transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
<resource>NOTICE.txt</resource>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
<resource>META-INF/LICENSE.txt</resource>
<file>${basedir}/../../LICENSE.txt</file>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
<resource>META-INF/NOTICE.txt</resource>
<file>${basedir}/../../NOTICE.txt</file>
</transformer>
</transformers>
<relocations>
<relocation>
<pattern>org</pattern>
<shadedPattern>${shaded.dependency.prefix}.org</shadedPattern>
<excludes>
<exclude>org/apache/zeppelin/*</exclude>
<exclude>org/apache/zeppelin/**/*</exclude>
<exclude>org/apache/thrift/*</exclude>
<exclude>org/apache/thrift/**/*</exclude>
<exclude>org/slf4j/*</exclude>
<exclude>org/slf4j/**/*</exclude>
<exclude>org/apache/commons/logging/*</exclude>
<exclude>org/apache/commons/logging/**/*</exclude>
<exclude>org/apache/commons/exec/*</exclude>
<exclude>org/apache/commons/exec/**/*</exclude>
<exclude>org/apache/log4j/*</exclude>
<exclude>org/apache/log4j/**/*</exclude>
<exclude>org/sonatype/*</exclude>
<exclude>org/sonatype/**/*</exclude>
<exclude>**/pom.xml</exclude>
<!-- Not the org/ packages that are a part of the jdk -->
<exclude>org/ietf/jgss/*</exclude>
<exclude>org/omg/**/*</exclude>
<exclude>org/w3c/dom/*</exclude>
<exclude>org/w3c/dom/**/*</exclude>
<exclude>org/xml/sax/*</exclude>
<exclude>org/xml/sax/**/*</exclude>
</excludes>
</relocation>
<relocation>
<pattern>com.google</pattern>
<shadedPattern>${shaded.dependency.prefix}.com.google</shadedPattern>
</relocation>
<relocation>
<pattern>io</pattern>
<shadedPattern>${shaded.dependency.prefix}.io</shadedPattern>
</relocation>
<relocation>
<pattern>com.esotericsoftware</pattern>
<shadedPattern>${shaded.dependency.prefix}.com.esotericsoftware</shadedPattern>
</relocation>
</relocations>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>copy-to-interpreter</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<echo>ANT TASK - copying files....</echo>
<copy todir="${project.basedir}/../interpreter" overwrite="true" flatten="true">
<fileset dir="${project.build.directory}" includes="zeppelin-interpreter-api-*.jar" >
</fileset>
</copy>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View file

@ -25,7 +25,7 @@
<artifactId>zeppelin</artifactId>
<groupId>org.apache.zeppelin</groupId>
<version>0.9.0-SNAPSHOT</version>
<relativePath>..</relativePath>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.apache.zeppelin</groupId>

View file

@ -74,7 +74,7 @@
</transformers>
<artifactSet>
<excludes>
<exclude>org.apache.zeppelin:zeppelin-interpreter-api</exclude>
<exclude>org.apache.zeppelin:zeppelin-interpreter-shaded</exclude>
</excludes>
</artifactSet>
<relocations>

View file

@ -517,7 +517,7 @@ public class DockerInterpreterProcess extends RemoteInterpreterProcess {
mkdirInContainer(containerId, intpGrpAllPath);
docker.copyToContainer(new File(intpGrpAllPath).toPath(), containerId, intpGrpAllPath);
// 8) ${ZEPPELIN_HOME}/lib/interpreter/zeppelin-interpreter-api-<version>.jar
// 8) ${ZEPPELIN_HOME}/lib/interpreter/zeppelin-interpreter-shaded-<version>.jar
// is uploaded to `${CONTAINER_ZEPPELIN_HOME}` directory in the container
String intpPath = "/interpreter";
String intpAllPath = getPathByHome(zeppelinHome, intpPath);