You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ch...@apache.org on 2023/05/15 17:43:16 UTC

[kyuubi-shaded] branch master updated: [KYUUBI-SHADED #3] Add shaded zookeeper 3.4 and 3.6

This is an automated email from the ASF dual-hosted git repository.

chengpan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kyuubi-shaded.git


The following commit(s) were added to refs/heads/master by this push:
     new 64babc5  [KYUUBI-SHADED #3] Add shaded zookeeper 3.4 and 3.6
64babc5 is described below

commit 64babc56e378cc611b5d9233dbcc65d6334de938
Author: Cheng Pan <ch...@apache.org>
AuthorDate: Tue May 16 01:43:07 2023 +0800

    [KYUUBI-SHADED #3] Add shaded zookeeper 3.4 and 3.6
    
    ### _Why are the changes needed?_
    
    Zookeeper 3.4 is still used widely today, e.g. CDH 5.x/6.x, HDP 2.x. Zookeeper 3.4 Client can talk to Zookeeper 3.5+ Server, but Zookeeper 3.5+ Client can not talk to Zookeeper 3.4 Server, so it's valuable to use Zookeeper 3.4 Client for compatibility
    
    ### _How was this patch tested?_
    - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
    
    - [ ] Add screenshots for manual tests if appropriate
    
    - [ ] [Run test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request
    
    Closes #3 from pan3793/zk.
    
    c7b993e [Cheng Pan] style
    469c365 [Cheng Pan] Add shaded zookeeper 3.4 and 3.6
    
    Authored-by: Cheng Pan <ch...@apache.org>
    Signed-off-by: Cheng Pan <ch...@apache.org>
---
 .../kyuubi-shaded-zookeeper-34/pom.xml             | 138 +++++++++++++++++++
 .../src/main/resources/META-INF/NOTICE             |  13 ++
 .../kyuubi-shaded-zookeeper-36/pom.xml             | 151 +++++++++++++++++++++
 .../src/main/resources/META-INF/NOTICE             |  24 ++++
 kyuubi-shaded-zookeeper-parent/pom.xml             | 104 ++++++++++++++
 pom.xml                                            |   3 +-
 6 files changed, 432 insertions(+), 1 deletion(-)

diff --git a/kyuubi-shaded-zookeeper-parent/kyuubi-shaded-zookeeper-34/pom.xml b/kyuubi-shaded-zookeeper-parent/kyuubi-shaded-zookeeper-34/pom.xml
new file mode 100644
index 0000000..3faf27d
--- /dev/null
+++ b/kyuubi-shaded-zookeeper-parent/kyuubi-shaded-zookeeper-34/pom.xml
@@ -0,0 +1,138 @@
+<?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 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.kyuubi</groupId>
+        <artifactId>kyuubi-shaded-zookeeper-parent</artifactId>
+        <version>0.1.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>kyuubi-shaded-zookeeper-34</artifactId>
+
+    <properties>
+        <zookeeper.version>3.4.14</zookeeper.version>
+        <curator.version>4.2.0</curator.version>
+    </properties>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.zookeeper</groupId>
+                <artifactId>zookeeper</artifactId>
+                <version>${zookeeper.version}</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.zookeeper</groupId>
+            <artifactId>zookeeper</artifactId>
+            <exclusions>
+                <exclusion>
+                    <!-- only required for ZK servers, not clients -->
+                    <groupId>io.netty</groupId>
+                    <artifactId>netty</artifactId>
+                </exclusion>
+                <exclusion>
+                    <!-- only required for ZK console shell -->
+                    <groupId>jline</groupId>
+                    <artifactId>jline</artifactId>
+                </exclusion>
+                <exclusion>
+                    <!-- kyuubi distribution provides logging classes -->
+                    <groupId>log4j</groupId>
+                    <artifactId>log4j</artifactId>
+                </exclusion>
+                <exclusion>
+                    <!-- not relevant at runtime -->
+                    <groupId>org.apache.yetus</groupId>
+                    <artifactId>audience-annotations</artifactId>
+                </exclusion>
+                <exclusion>
+                    <!-- kyuubi distribution provides logging classes -->
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
+                <exclusion>
+                    <!-- not relevant at runtime -->
+                    <groupId>com.google.code.findbugs</groupId>
+                    <artifactId>jsr305</artifactId>
+                </exclusion>
+                <exclusion>
+                    <!-- not relevant at runtime -->
+                    <groupId>com.github.spotbugs</groupId>
+                    <artifactId>spotbugs-annotations</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-recipes</artifactId>
+            <version>${curator.version}</version>
+            <exclusions>
+                <exclusion>
+                    <!-- not relevant at runtime -->
+                    <groupId>com.google.code.findbugs</groupId>
+                    <artifactId>jsr305</artifactId>
+                </exclusion>
+                <exclusion>
+                    <!-- not relevant at runtime -->
+                    <groupId>com.google.errorprone</groupId>
+                    <artifactId>error_prone_annotations</artifactId>
+                </exclusion>
+                <exclusion>
+                    <!-- supposedly not required -->
+                    <groupId>com.google.guava</groupId>
+                    <artifactId>failureaccess</artifactId>
+                </exclusion>
+                <exclusion>
+                    <!-- supposedly not required -->
+                    <groupId>com.google.guava</groupId>
+                    <artifactId>listenablefuture</artifactId>
+                </exclusion>
+                <exclusion>
+                    <!-- not relevant at runtime -->
+                    <groupId>com.google.j2objc</groupId>
+                    <artifactId>j2objc-annotations</artifactId>
+                </exclusion>
+                <exclusion>
+                    <!-- not relevant at runtime -->
+                    <groupId>org.checkerframework</groupId>
+                    <artifactId>checker-qual</artifactId>
+                </exclusion>
+                <exclusion>
+                    <!-- not relevant at runtime -->
+                    <groupId>org.codehaus.mojo</groupId>
+                    <artifactId>animal-sniffer-annotations</artifactId>
+                </exclusion>
+                <exclusion>
+                    <!-- kyuubi distribution provides logging classes -->
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-api</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/kyuubi-shaded-zookeeper-parent/kyuubi-shaded-zookeeper-34/src/main/resources/META-INF/NOTICE b/kyuubi-shaded-zookeeper-parent/kyuubi-shaded-zookeeper-34/src/main/resources/META-INF/NOTICE
new file mode 100644
index 0000000..931f0f5
--- /dev/null
+++ b/kyuubi-shaded-zookeeper-parent/kyuubi-shaded-zookeeper-34/src/main/resources/META-INF/NOTICE
@@ -0,0 +1,13 @@
+flink-shaded-zookeeper-34
+Copyright 2023 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (https://www.apache.org/).
+
+This project bundles the following dependencies under the Apache Software License 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt)
+
+- com.google.guava:guava:27.0.1-jre
+- org.apache.curator:curator-client:4.2.0
+- org.apache.curator:curator-framework:4.2.0
+- org.apache.curator:curator-recipes:4.2.0
+- org.apache.zookeeper:zookeeper:3.4.14
diff --git a/kyuubi-shaded-zookeeper-parent/kyuubi-shaded-zookeeper-36/pom.xml b/kyuubi-shaded-zookeeper-parent/kyuubi-shaded-zookeeper-36/pom.xml
new file mode 100644
index 0000000..77a26b7
--- /dev/null
+++ b/kyuubi-shaded-zookeeper-parent/kyuubi-shaded-zookeeper-36/pom.xml
@@ -0,0 +1,151 @@
+<?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 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.kyuubi</groupId>
+        <artifactId>kyuubi-shaded-zookeeper-parent</artifactId>
+        <version>0.1.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>kyuubi-shaded-zookeeper-36</artifactId>
+
+    <properties>
+        <zookeeper.version>3.6.4</zookeeper.version>
+        <curator.version>5.4.0</curator.version>
+        <netty.version>4.1.91.Final</netty.version>
+    </properties>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.zookeeper</groupId>
+                <artifactId>zookeeper</artifactId>
+                <version>${zookeeper.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>io.netty</groupId>
+                <artifactId>netty-bom</artifactId>
+                <version>${netty.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.zookeeper</groupId>
+            <artifactId>zookeeper</artifactId>
+            <exclusions>
+                <exclusion>
+                    <!-- kyuubi distribution provides logging classes -->
+                    <groupId>log4j</groupId>
+                    <artifactId>log4j</artifactId>
+                </exclusion>
+                <exclusion>
+                    <!-- not relevant at runtime -->
+                    <groupId>org.apache.yetus</groupId>
+                    <artifactId>audience-annotations</artifactId>
+                </exclusion>
+                <exclusion>
+                    <!-- kyuubi distribution provides logging classes -->
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-api</artifactId>
+                </exclusion>
+                <exclusion>
+                    <!-- kyuubi distribution provides logging classes -->
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-log4j12</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <!-- Zookeeper dependency, that is inexplicably set to provided.
+                 Unfortunately not optional, because the ServerMetrics class, again inexplicably,
+                 has a hard dependency on it for testing purposes.-->
+            <groupId>io.dropwizard.metrics</groupId>
+            <artifactId>metrics-core</artifactId>
+            <version>3.2.5</version>
+            <exclusions>
+                <exclusion>
+                    <!-- kyuubi distribution provides logging classes -->
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-api</artifactId>
+                </exclusion>
+                <exclusion>
+                    <!-- kyuubi distribution provides logging classes -->
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-log4j12</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-recipes</artifactId>
+            <version>${curator.version}</version>
+            <exclusions>
+                <exclusion>
+                    <!-- not relevant at runtime -->
+                    <groupId>com.google.code.findbugs</groupId>
+                    <artifactId>jsr305</artifactId>
+                </exclusion>
+                <exclusion>
+                    <!-- not relevant at runtime -->
+                    <groupId>com.google.errorprone</groupId>
+                    <artifactId>error_prone_annotations</artifactId>
+                </exclusion>
+                <exclusion>
+                    <!-- supposedly not required -->
+                    <groupId>com.google.guava</groupId>
+                    <artifactId>failureaccess</artifactId>
+                </exclusion>
+                <exclusion>
+                    <!-- supposedly not required -->
+                    <groupId>com.google.guava</groupId>
+                    <artifactId>listenablefuture</artifactId>
+                </exclusion>
+                <exclusion>
+                    <!-- not relevant at runtime -->
+                    <groupId>com.google.j2objc</groupId>
+                    <artifactId>j2objc-annotations</artifactId>
+                </exclusion>
+                <exclusion>
+                    <!-- not relevant at runtime -->
+                    <groupId>org.checkerframework</groupId>
+                    <artifactId>checker-qual</artifactId>
+                </exclusion>
+                <exclusion>
+                    <!-- not relevant at runtime -->
+                    <groupId>org.codehaus.mojo</groupId>
+                    <artifactId>animal-sniffer-annotations</artifactId>
+                </exclusion>
+                <exclusion>
+                    <!-- kyuubi distribution provides logging classes -->
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-api</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/kyuubi-shaded-zookeeper-parent/kyuubi-shaded-zookeeper-36/src/main/resources/META-INF/NOTICE b/kyuubi-shaded-zookeeper-parent/kyuubi-shaded-zookeeper-36/src/main/resources/META-INF/NOTICE
new file mode 100644
index 0000000..6f6c126
--- /dev/null
+++ b/kyuubi-shaded-zookeeper-parent/kyuubi-shaded-zookeeper-36/src/main/resources/META-INF/NOTICE
@@ -0,0 +1,24 @@
+kyuubi-shaded-zookeeper-36
+Copyright 2023 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (https://www.apache.org/).
+
+This project bundles the following dependencies under the Apache Software License 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt)
+
+- com.google.guava:guava:31.1-jre
+- io.dropwizard.metrics:metrics-core:3.2.5
+- io.netty:netty-buffer:4.1.91.Final
+- io.netty:netty-codec:4.1.91.Final
+- io.netty:netty-common:4.1.91.Final
+- io.netty:netty-handler:4.1.91.Final
+- io.netty:netty-resolver:4.1.91.Final
+- io.netty:netty-transport-classes-epoll:4.1.91.Final
+- io.netty:netty-transport-native-epoll:4.1.91.Final
+- io.netty:netty-transport-native-unix-common:4.1.91.Final
+- io.netty:netty-transport:4.1.91.Final
+- org.apache.curator:curator-client:5.4.0
+- org.apache.curator:curator-framework:5.4.0
+- org.apache.curator:curator-recipes:5.4.0
+- org.apache.zookeeper:zookeeper-jute:3.6.4
+- org.apache.zookeeper:zookeeper:3.6.4
diff --git a/kyuubi-shaded-zookeeper-parent/pom.xml b/kyuubi-shaded-zookeeper-parent/pom.xml
new file mode 100644
index 0000000..17e7630
--- /dev/null
+++ b/kyuubi-shaded-zookeeper-parent/pom.xml
@@ -0,0 +1,104 @@
+<?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 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.kyuubi</groupId>
+        <artifactId>kyuubi-shaded-parent</artifactId>
+        <version>0.1.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>kyuubi-shaded-zookeeper-parent</artifactId>
+    <packaging>pom</packaging>
+    <name>kyuubi-shaded-zookeeper-parent</name>
+
+    <modules>
+        <module>kyuubi-shaded-zookeeper-34</module>
+        <module>kyuubi-shaded-zookeeper-36</module>
+    </modules>
+
+    <properties>
+        <shading.zookeeper.prefix>${shading.prefix}.zookeeper</shading.zookeeper.prefix>
+        <shading.curator.prefix>${shading.prefix}.curator</shading.curator.prefix>
+    </properties>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>shade-kyuubi</id>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <phase>package</phase>
+                        <configuration>
+                            <createDependencyReducedPom>true</createDependencyReducedPom>
+                            <dependencyReducedPomLocation>${project.basedir}/target/dependency-reduced-pom.xml</dependencyReducedPomLocation>
+                            <artifactSet>
+                                <includes>
+                                    <include>*</include>
+                                </includes>
+                            </artifactSet>
+                            <relocations>
+                                <relocation>
+                                    <pattern>org.apache.zookeeper</pattern>
+                                    <shadedPattern>${shading.zookeeper.prefix}.org.apache.zookeeper</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>io.netty</pattern>
+                                    <shadedPattern>${shading.zookeeper.prefix}.io.netty</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>org.apache.jute</pattern>
+                                    <shadedPattern>${shading.zookeeper.prefix}.org.apache.jute</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>com.codahale.metrics</pattern>
+                                    <shadedPattern>${shading.zookeeper.prefix}.com.codahale.metrics</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>org.apache.curator</pattern>
+                                    <shadedPattern>${shading.curator.prefix}.org.apache.curator</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>com.google</pattern>
+                                    <shadedPattern>${shading.curator.prefix}.com.google</shadedPattern>
+                                </relocation>
+                            </relocations>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <!-- Used to resolve variables in the 'version' tag -->
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>flatten-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
diff --git a/pom.xml b/pom.xml
index e42451c..7f686b7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -52,6 +52,7 @@
 
     <modules>
         <module>kyuubi-shaded-force-shading</module>
+        <module>kyuubi-shaded-zookeeper-parent</module>
     </modules>
 
     <scm>
@@ -98,7 +99,7 @@
         <maven.build.timestamp.format>yyyy-MM-dd HH:mm:ss z</maven.build.timestamp.format>
 
         <!-- Package to use when relocating shaded classes. -->
-        <kyuubi.shade.packageName>org.apache.kyuubi.shade</kyuubi.shade.packageName>
+        <shading.prefix>org.apache.kyuubi.shaded</shading.prefix>
 
         <!-- Needed for Spotless style check-->
         <spotless.java.googlejavaformat.version>1.7</spotless.java.googlejavaformat.version>