Skip to content

Commit

Permalink
[improve][misc] Upgrade to Netty 4.1.111.Final and switch to use grpc…
Browse files Browse the repository at this point in the history
…-netty-shaded (apache#22892)

(cherry picked from commit 75d7e55)
(cherry picked from commit a982d7b)
  • Loading branch information
lhotari authored and nikhil-ctds committed Jun 27, 2024
1 parent a25c6cd commit a150c1e
Show file tree
Hide file tree
Showing 14 changed files with 360 additions and 91 deletions.
2 changes: 1 addition & 1 deletion buildtools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<license-maven-plugin.version>4.1</license-maven-plugin.version>
<puppycrawl.checkstyle.version>10.14.2</puppycrawl.checkstyle.version>
<maven-checkstyle-plugin.version>3.1.2</maven-checkstyle-plugin.version>
<netty.version>4.1.108.Final</netty.version>
<netty.version>4.1.111.Final</netty.version>
<guice.version>4.2.3</guice.version>
<guava.version>32.1.1-jre</guava.version>
<ant.version>1.10.12</ant.version>
Expand Down
13 changes: 13 additions & 0 deletions distribution/server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,19 @@
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>pulsar-metadata</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>jetcd-core-shaded</artifactId>
<version>${project.version}</version>
<classifier>shaded</classifier>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>pulsar-proxy</artifactId>
Expand Down
50 changes: 22 additions & 28 deletions distribution/server/src/assemble/LICENSE.bin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -289,27 +289,27 @@ The Apache Software License, Version 2.0
- org.apache.commons-commons-lang3-3.11.jar
- org.apache.commons-commons-text-1.10.0.jar
* Netty
- io.netty-netty-buffer-4.1.108.Final.jar
- io.netty-netty-codec-4.1.108.Final.jar
- io.netty-netty-codec-dns-4.1.108.Final.jar
- io.netty-netty-codec-http-4.1.108.Final.jar
- io.netty-netty-codec-http2-4.1.108.Final.jar
- io.netty-netty-codec-socks-4.1.108.Final.jar
- io.netty-netty-codec-haproxy-4.1.108.Final.jar
- io.netty-netty-common-4.1.108.Final.jar
- io.netty-netty-handler-4.1.108.Final.jar
- io.netty-netty-handler-proxy-4.1.108.Final.jar
- io.netty-netty-resolver-4.1.108.Final.jar
- io.netty-netty-resolver-dns-4.1.108.Final.jar
- io.netty-netty-resolver-dns-classes-macos-4.1.108.Final.jar
- io.netty-netty-resolver-dns-native-macos-4.1.108.Final-osx-aarch_64.jar
- io.netty-netty-resolver-dns-native-macos-4.1.108.Final-osx-x86_64.jar
- io.netty-netty-transport-4.1.108.Final.jar
- io.netty-netty-transport-classes-epoll-4.1.108.Final.jar
- io.netty-netty-transport-native-epoll-4.1.108.Final-linux-aarch_64.jar
- io.netty-netty-transport-native-epoll-4.1.108.Final-linux-x86_64.jar
- io.netty-netty-transport-native-unix-common-4.1.108.Final.jar
- io.netty-netty-transport-native-unix-common-4.1.108.Final-linux-x86_64.jar
- io.netty-netty-buffer-4.1.111.Final.jar
- io.netty-netty-codec-4.1.111.Final.jar
- io.netty-netty-codec-dns-4.1.111.Final.jar
- io.netty-netty-codec-http-4.1.111.Final.jar
- io.netty-netty-codec-http2-4.1.111.Final.jar
- io.netty-netty-codec-socks-4.1.111.Final.jar
- io.netty-netty-codec-haproxy-4.1.111.Final.jar
- io.netty-netty-common-4.1.111.Final.jar
- io.netty-netty-handler-4.1.111.Final.jar
- io.netty-netty-handler-proxy-4.1.111.Final.jar
- io.netty-netty-resolver-4.1.111.Final.jar
- io.netty-netty-resolver-dns-4.1.111.Final.jar
- io.netty-netty-resolver-dns-classes-macos-4.1.111.Final.jar
- io.netty-netty-resolver-dns-native-macos-4.1.111.Final-osx-aarch_64.jar
- io.netty-netty-resolver-dns-native-macos-4.1.111.Final-osx-x86_64.jar
- io.netty-netty-transport-4.1.111.Final.jar
- io.netty-netty-transport-classes-epoll-4.1.111.Final.jar
- io.netty-netty-transport-native-epoll-4.1.111.Final-linux-aarch_64.jar
- io.netty-netty-transport-native-epoll-4.1.111.Final-linux-x86_64.jar
- io.netty-netty-transport-native-unix-common-4.1.111.Final.jar
- io.netty-netty-transport-native-unix-common-4.1.111.Final-linux-x86_64.jar
- io.netty-netty-tcnative-boringssl-static-2.0.65.Final.jar
- io.netty-netty-tcnative-boringssl-static-2.0.65.Final-linux-aarch_64.jar
- io.netty-netty-tcnative-boringssl-static-2.0.65.Final-linux-x86_64.jar
Expand Down Expand Up @@ -424,7 +424,6 @@ The Apache Software License, Version 2.0
- io.grpc-grpc-auth-1.55.3.jar
- io.grpc-grpc-context-1.55.3.jar
- io.grpc-grpc-core-1.55.3.jar
- io.grpc-grpc-netty-1.55.3.jar
- io.grpc-grpc-protobuf-1.55.3.jar
- io.grpc-grpc-protobuf-lite-1.55.3.jar
- io.grpc-grpc-stub-1.55.3.jar
Expand Down Expand Up @@ -483,7 +482,6 @@ The Apache Software License, Version 2.0
- io.vertx-vertx-core-4.5.8.jar
- io.vertx-vertx-web-4.5.8.jar
- io.vertx-vertx-web-common-4.5.8.jar
- io.vertx-vertx-grpc-4.5.8.jar
* Apache ZooKeeper
- org.apache.zookeeper-zookeeper-3.9.2.jar
- org.apache.zookeeper-zookeeper-jute-3.9.2.jar
Expand All @@ -495,11 +493,7 @@ The Apache Software License, Version 2.0
- com.google.http-client-google-http-client-1.41.0.jar
- com.google.auto.value-auto-value-annotations-1.9.jar
- com.google.re2j-re2j-1.6.jar
* Jetcd
- io.etcd-jetcd-api-0.7.7.jar
- io.etcd-jetcd-common-0.7.7.jar
- io.etcd-jetcd-core-0.7.7.jar
- io.etcd-jetcd-grpc-0.7.7.jar
* Jetcd - shaded
* IPAddress
- com.github.seancfoley-ipaddress-5.5.0.jar
* RxJava
Expand Down
40 changes: 20 additions & 20 deletions distribution/shell/src/assemble/LICENSE.bin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -344,23 +344,23 @@ The Apache Software License, Version 2.0
- commons-text-1.10.0.jar
- commons-compress-1.26.0.jar
* Netty
- netty-buffer-4.1.108.Final.jar
- netty-codec-4.1.108.Final.jar
- netty-codec-dns-4.1.108.Final.jar
- netty-codec-http-4.1.108.Final.jar
- netty-codec-socks-4.1.108.Final.jar
- netty-codec-haproxy-4.1.108.Final.jar
- netty-common-4.1.108.Final.jar
- netty-handler-4.1.108.Final.jar
- netty-handler-proxy-4.1.108.Final.jar
- netty-resolver-4.1.108.Final.jar
- netty-resolver-dns-4.1.108.Final.jar
- netty-transport-4.1.108.Final.jar
- netty-transport-classes-epoll-4.1.108.Final.jar
- netty-transport-native-epoll-4.1.108.Final-linux-aarch_64.jar
- netty-transport-native-epoll-4.1.108.Final-linux-x86_64.jar
- netty-transport-native-unix-common-4.1.108.Final.jar
- netty-transport-native-unix-common-4.1.108.Final-linux-x86_64.jar
- netty-buffer-4.1.111.Final.jar
- netty-codec-4.1.111.Final.jar
- netty-codec-dns-4.1.111.Final.jar
- netty-codec-http-4.1.111.Final.jar
- netty-codec-socks-4.1.111.Final.jar
- netty-codec-haproxy-4.1.111.Final.jar
- netty-common-4.1.111.Final.jar
- netty-handler-4.1.111.Final.jar
- netty-handler-proxy-4.1.111.Final.jar
- netty-resolver-4.1.111.Final.jar
- netty-resolver-dns-4.1.111.Final.jar
- netty-transport-4.1.111.Final.jar
- netty-transport-classes-epoll-4.1.111.Final.jar
- netty-transport-native-epoll-4.1.111.Final-linux-aarch_64.jar
- netty-transport-native-epoll-4.1.111.Final-linux-x86_64.jar
- netty-transport-native-unix-common-4.1.111.Final.jar
- netty-transport-native-unix-common-4.1.111.Final-linux-x86_64.jar
- netty-tcnative-boringssl-static-2.0.65.Final.jar
- netty-tcnative-boringssl-static-2.0.65.Final-linux-aarch_64.jar
- netty-tcnative-boringssl-static-2.0.65.Final-linux-x86_64.jar
Expand All @@ -371,9 +371,9 @@ The Apache Software License, Version 2.0
- netty-incubator-transport-classes-io_uring-0.0.21.Final.jar
- netty-incubator-transport-native-io_uring-0.0.21.Final-linux-aarch_64.jar
- netty-incubator-transport-native-io_uring-0.0.21.Final-linux-x86_64.jar
- netty-resolver-dns-classes-macos-4.1.108.Final.jar
- netty-resolver-dns-native-macos-4.1.108.Final-osx-aarch_64.jar
- netty-resolver-dns-native-macos-4.1.108.Final-osx-x86_64.jar
- netty-resolver-dns-classes-macos-4.1.111.Final.jar
- netty-resolver-dns-native-macos-4.1.111.Final-osx-aarch_64.jar
- netty-resolver-dns-native-macos-4.1.111.Final-osx-x86_64.jar
* Prometheus client
- simpleclient-0.16.0.jar
- simpleclient_log4j2-0.16.0.jar
Expand Down
187 changes: 187 additions & 0 deletions jetcd-core-shaded/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
<?xml version="1.0"?>
<!--
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
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.datastax.oss</groupId>
<artifactId>pulsar</artifactId>
<version>3.1.4.3-SNAPSHOT</version>
</parent>

<artifactId>jetcd-core-shaded</artifactId>
<name>Apache Pulsar :: jetcd-core shaded</name>

<dependencies>
<dependency>
<groupId>io.etcd</groupId>
<artifactId>jetcd-core</artifactId>
<exclusions>
<exclusion>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty-shaded</artifactId>
</dependency>
<!-- add transient dependencies for jetcd libraries, this is necessary for IntelliJ support -->
<dependency>
<groupId>dev.failsafe</groupId>
<artifactId>failsafe</artifactId>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-protobuf</artifactId>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-stub</artifactId>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-grpclb</artifactId>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-util</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>true</createDependencyReducedPom>
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
<minimizeJar>false</minimizeJar>
<artifactSet>
<includes>
<include>io.etcd:*</include>
<include>io.vertx:*</include>
</includes>
</artifactSet>
<relocations>
<!-- relocate vertx packages since they will be transformed to use grpc-netty-shaded packages -->
<relocation>
<pattern>io.vertx</pattern>
<shadedPattern>org.apache.pulsar.jetcd.shaded.io.vertx</shadedPattern>
</relocation>
<!-- relocate to use grpc-netty-shaded packages -->
<relocation>
<pattern>io.grpc.netty</pattern>
<shadedPattern>io.grpc.netty.shaded.io.grpc.netty</shadedPattern>
</relocation>
<!-- relocate to use grpc-netty-shaded packages -->
<relocation>
<pattern>io.netty</pattern>
<shadedPattern>io.grpc.netty.shaded.io.netty</shadedPattern>
</relocation>
</relocations>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
<exclude>META-INF/maven/${project.groupId}/${project.artifactId}/pom.xml</exclude>
</excludes>
</filter>
</filters>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
<transformer implementation="org.apache.maven.plugins.shade.resource.PluginXmlResourceTransformer"/>
<transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
<resource>META-INF/maven/${project.groupId}/${project.artifactId}/pom.xml</resource>
<file>${project.basedir}/dependency-reduced-pom.xml</file>
</transformer>
</transformers>
<!-- required for IntelliJ support -->
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>shaded</shadedClassifierName>
</configuration>
</execution>
</executions>
</plugin>
<!-- required for IntelliJ support, for some reason shadedArtifactAttached isn't sufficient alone -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>attach-shaded-jar</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>${project.build.directory}/${project.artifactId}-${project.version}-shaded.jar</file>
<type>jar</type>
<classifier>shaded</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
<!-- required for running tests in subproject -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>${maven-antrun-plugin.version}</version>
<executions>
<execution>
<id>unpack-shaded-jar</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<unzip src="${project.build.directory}/${project.artifactId}-${project.version}-shaded.jar"
dest="${project.build.outputDirectory}"
overwrite="true" />
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Loading

0 comments on commit a150c1e

Please sign in to comment.