Skip to content

Commit 7ca018a

Browse files
lhotarinikhil-ctds
authored andcommitted
[improve][misc] Upgrade to Netty 4.1.111.Final and switch to use grpc-netty-shaded (apache#22892)
(cherry picked from commit 75d7e55) (cherry picked from commit a982d7b)
1 parent 71b7561 commit 7ca018a

File tree

14 files changed

+360
-91
lines changed

14 files changed

+360
-91
lines changed

buildtools/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<license-maven-plugin.version>4.1</license-maven-plugin.version>
4848
<puppycrawl.checkstyle.version>10.14.2</puppycrawl.checkstyle.version>
4949
<maven-checkstyle-plugin.version>3.1.2</maven-checkstyle-plugin.version>
50-
<netty.version>4.1.108.Final</netty.version>
50+
<netty.version>4.1.111.Final</netty.version>
5151
<guice.version>4.2.3</guice.version>
5252
<guava.version>32.1.1-jre</guava.version>
5353
<ant.version>1.10.12</ant.version>

distribution/server/pom.xml

+13
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,19 @@
4646
<version>${project.version}</version>
4747
</dependency>
4848

49+
<dependency>
50+
<groupId>${project.groupId}</groupId>
51+
<artifactId>pulsar-metadata</artifactId>
52+
<version>${project.version}</version>
53+
</dependency>
54+
55+
<dependency>
56+
<groupId>${project.groupId}</groupId>
57+
<artifactId>jetcd-core-shaded</artifactId>
58+
<version>${project.version}</version>
59+
<classifier>shaded</classifier>
60+
</dependency>
61+
4962
<dependency>
5063
<groupId>${project.groupId}</groupId>
5164
<artifactId>pulsar-proxy</artifactId>

distribution/server/src/assemble/LICENSE.bin.txt

+22-28
Original file line numberDiff line numberDiff line change
@@ -289,27 +289,27 @@ The Apache Software License, Version 2.0
289289
- org.apache.commons-commons-lang3-3.11.jar
290290
- org.apache.commons-commons-text-1.10.0.jar
291291
* Netty
292-
- io.netty-netty-buffer-4.1.108.Final.jar
293-
- io.netty-netty-codec-4.1.108.Final.jar
294-
- io.netty-netty-codec-dns-4.1.108.Final.jar
295-
- io.netty-netty-codec-http-4.1.108.Final.jar
296-
- io.netty-netty-codec-http2-4.1.108.Final.jar
297-
- io.netty-netty-codec-socks-4.1.108.Final.jar
298-
- io.netty-netty-codec-haproxy-4.1.108.Final.jar
299-
- io.netty-netty-common-4.1.108.Final.jar
300-
- io.netty-netty-handler-4.1.108.Final.jar
301-
- io.netty-netty-handler-proxy-4.1.108.Final.jar
302-
- io.netty-netty-resolver-4.1.108.Final.jar
303-
- io.netty-netty-resolver-dns-4.1.108.Final.jar
304-
- io.netty-netty-resolver-dns-classes-macos-4.1.108.Final.jar
305-
- io.netty-netty-resolver-dns-native-macos-4.1.108.Final-osx-aarch_64.jar
306-
- io.netty-netty-resolver-dns-native-macos-4.1.108.Final-osx-x86_64.jar
307-
- io.netty-netty-transport-4.1.108.Final.jar
308-
- io.netty-netty-transport-classes-epoll-4.1.108.Final.jar
309-
- io.netty-netty-transport-native-epoll-4.1.108.Final-linux-aarch_64.jar
310-
- io.netty-netty-transport-native-epoll-4.1.108.Final-linux-x86_64.jar
311-
- io.netty-netty-transport-native-unix-common-4.1.108.Final.jar
312-
- io.netty-netty-transport-native-unix-common-4.1.108.Final-linux-x86_64.jar
292+
- io.netty-netty-buffer-4.1.111.Final.jar
293+
- io.netty-netty-codec-4.1.111.Final.jar
294+
- io.netty-netty-codec-dns-4.1.111.Final.jar
295+
- io.netty-netty-codec-http-4.1.111.Final.jar
296+
- io.netty-netty-codec-http2-4.1.111.Final.jar
297+
- io.netty-netty-codec-socks-4.1.111.Final.jar
298+
- io.netty-netty-codec-haproxy-4.1.111.Final.jar
299+
- io.netty-netty-common-4.1.111.Final.jar
300+
- io.netty-netty-handler-4.1.111.Final.jar
301+
- io.netty-netty-handler-proxy-4.1.111.Final.jar
302+
- io.netty-netty-resolver-4.1.111.Final.jar
303+
- io.netty-netty-resolver-dns-4.1.111.Final.jar
304+
- io.netty-netty-resolver-dns-classes-macos-4.1.111.Final.jar
305+
- io.netty-netty-resolver-dns-native-macos-4.1.111.Final-osx-aarch_64.jar
306+
- io.netty-netty-resolver-dns-native-macos-4.1.111.Final-osx-x86_64.jar
307+
- io.netty-netty-transport-4.1.111.Final.jar
308+
- io.netty-netty-transport-classes-epoll-4.1.111.Final.jar
309+
- io.netty-netty-transport-native-epoll-4.1.111.Final-linux-aarch_64.jar
310+
- io.netty-netty-transport-native-epoll-4.1.111.Final-linux-x86_64.jar
311+
- io.netty-netty-transport-native-unix-common-4.1.111.Final.jar
312+
- io.netty-netty-transport-native-unix-common-4.1.111.Final-linux-x86_64.jar
313313
- io.netty-netty-tcnative-boringssl-static-2.0.65.Final.jar
314314
- io.netty-netty-tcnative-boringssl-static-2.0.65.Final-linux-aarch_64.jar
315315
- io.netty-netty-tcnative-boringssl-static-2.0.65.Final-linux-x86_64.jar
@@ -424,7 +424,6 @@ The Apache Software License, Version 2.0
424424
- io.grpc-grpc-auth-1.55.3.jar
425425
- io.grpc-grpc-context-1.55.3.jar
426426
- io.grpc-grpc-core-1.55.3.jar
427-
- io.grpc-grpc-netty-1.55.3.jar
428427
- io.grpc-grpc-protobuf-1.55.3.jar
429428
- io.grpc-grpc-protobuf-lite-1.55.3.jar
430429
- io.grpc-grpc-stub-1.55.3.jar
@@ -483,7 +482,6 @@ The Apache Software License, Version 2.0
483482
- io.vertx-vertx-core-4.5.8.jar
484483
- io.vertx-vertx-web-4.5.8.jar
485484
- io.vertx-vertx-web-common-4.5.8.jar
486-
- io.vertx-vertx-grpc-4.5.8.jar
487485
* Apache ZooKeeper
488486
- org.apache.zookeeper-zookeeper-3.9.2.jar
489487
- org.apache.zookeeper-zookeeper-jute-3.9.2.jar
@@ -495,11 +493,7 @@ The Apache Software License, Version 2.0
495493
- com.google.http-client-google-http-client-1.41.0.jar
496494
- com.google.auto.value-auto-value-annotations-1.9.jar
497495
- com.google.re2j-re2j-1.6.jar
498-
* Jetcd
499-
- io.etcd-jetcd-api-0.7.7.jar
500-
- io.etcd-jetcd-common-0.7.7.jar
501-
- io.etcd-jetcd-core-0.7.7.jar
502-
- io.etcd-jetcd-grpc-0.7.7.jar
496+
* Jetcd - shaded
503497
* IPAddress
504498
- com.github.seancfoley-ipaddress-5.5.0.jar
505499
* RxJava

distribution/shell/src/assemble/LICENSE.bin.txt

+20-20
Original file line numberDiff line numberDiff line change
@@ -344,23 +344,23 @@ The Apache Software License, Version 2.0
344344
- commons-text-1.10.0.jar
345345
- commons-compress-1.26.0.jar
346346
* Netty
347-
- netty-buffer-4.1.108.Final.jar
348-
- netty-codec-4.1.108.Final.jar
349-
- netty-codec-dns-4.1.108.Final.jar
350-
- netty-codec-http-4.1.108.Final.jar
351-
- netty-codec-socks-4.1.108.Final.jar
352-
- netty-codec-haproxy-4.1.108.Final.jar
353-
- netty-common-4.1.108.Final.jar
354-
- netty-handler-4.1.108.Final.jar
355-
- netty-handler-proxy-4.1.108.Final.jar
356-
- netty-resolver-4.1.108.Final.jar
357-
- netty-resolver-dns-4.1.108.Final.jar
358-
- netty-transport-4.1.108.Final.jar
359-
- netty-transport-classes-epoll-4.1.108.Final.jar
360-
- netty-transport-native-epoll-4.1.108.Final-linux-aarch_64.jar
361-
- netty-transport-native-epoll-4.1.108.Final-linux-x86_64.jar
362-
- netty-transport-native-unix-common-4.1.108.Final.jar
363-
- netty-transport-native-unix-common-4.1.108.Final-linux-x86_64.jar
347+
- netty-buffer-4.1.111.Final.jar
348+
- netty-codec-4.1.111.Final.jar
349+
- netty-codec-dns-4.1.111.Final.jar
350+
- netty-codec-http-4.1.111.Final.jar
351+
- netty-codec-socks-4.1.111.Final.jar
352+
- netty-codec-haproxy-4.1.111.Final.jar
353+
- netty-common-4.1.111.Final.jar
354+
- netty-handler-4.1.111.Final.jar
355+
- netty-handler-proxy-4.1.111.Final.jar
356+
- netty-resolver-4.1.111.Final.jar
357+
- netty-resolver-dns-4.1.111.Final.jar
358+
- netty-transport-4.1.111.Final.jar
359+
- netty-transport-classes-epoll-4.1.111.Final.jar
360+
- netty-transport-native-epoll-4.1.111.Final-linux-aarch_64.jar
361+
- netty-transport-native-epoll-4.1.111.Final-linux-x86_64.jar
362+
- netty-transport-native-unix-common-4.1.111.Final.jar
363+
- netty-transport-native-unix-common-4.1.111.Final-linux-x86_64.jar
364364
- netty-tcnative-boringssl-static-2.0.65.Final.jar
365365
- netty-tcnative-boringssl-static-2.0.65.Final-linux-aarch_64.jar
366366
- netty-tcnative-boringssl-static-2.0.65.Final-linux-x86_64.jar
@@ -371,9 +371,9 @@ The Apache Software License, Version 2.0
371371
- netty-incubator-transport-classes-io_uring-0.0.21.Final.jar
372372
- netty-incubator-transport-native-io_uring-0.0.21.Final-linux-aarch_64.jar
373373
- netty-incubator-transport-native-io_uring-0.0.21.Final-linux-x86_64.jar
374-
- netty-resolver-dns-classes-macos-4.1.108.Final.jar
375-
- netty-resolver-dns-native-macos-4.1.108.Final-osx-aarch_64.jar
376-
- netty-resolver-dns-native-macos-4.1.108.Final-osx-x86_64.jar
374+
- netty-resolver-dns-classes-macos-4.1.111.Final.jar
375+
- netty-resolver-dns-native-macos-4.1.111.Final-osx-aarch_64.jar
376+
- netty-resolver-dns-native-macos-4.1.111.Final-osx-x86_64.jar
377377
* Prometheus client
378378
- simpleclient-0.16.0.jar
379379
- simpleclient_log4j2-0.16.0.jar

jetcd-core-shaded/pom.xml

+187
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
4+
Licensed to the Apache Software Foundation (ASF) under one
5+
or more contributor license agreements. See the NOTICE file
6+
distributed with this work for additional information
7+
regarding copyright ownership. The ASF licenses this file
8+
to you under the Apache License, Version 2.0 (the
9+
"License"); you may not use this file except in compliance
10+
with the License. You may obtain a copy of the License at
11+
12+
http://www.apache.org/licenses/LICENSE-2.0
13+
14+
Unless required by applicable law or agreed to in writing,
15+
software distributed under the License is distributed on an
16+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17+
KIND, either express or implied. See the License for the
18+
specific language governing permissions and limitations
19+
under the License.
20+
21+
-->
22+
<project
23+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
24+
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
25+
<modelVersion>4.0.0</modelVersion>
26+
<parent>
27+
<groupId>com.datastax.oss</groupId>
28+
<artifactId>pulsar</artifactId>
29+
<version>3.1.4.3-SNAPSHOT</version>
30+
</parent>
31+
32+
<artifactId>jetcd-core-shaded</artifactId>
33+
<name>Apache Pulsar :: jetcd-core shaded</name>
34+
35+
<dependencies>
36+
<dependency>
37+
<groupId>io.etcd</groupId>
38+
<artifactId>jetcd-core</artifactId>
39+
<exclusions>
40+
<exclusion>
41+
<groupId>io.grpc</groupId>
42+
<artifactId>grpc-netty</artifactId>
43+
</exclusion>
44+
<exclusion>
45+
<groupId>io.netty</groupId>
46+
<artifactId>*</artifactId>
47+
</exclusion>
48+
</exclusions>
49+
</dependency>
50+
<dependency>
51+
<groupId>io.grpc</groupId>
52+
<artifactId>grpc-netty-shaded</artifactId>
53+
</dependency>
54+
<!-- add transient dependencies for jetcd libraries, this is necessary for IntelliJ support -->
55+
<dependency>
56+
<groupId>dev.failsafe</groupId>
57+
<artifactId>failsafe</artifactId>
58+
</dependency>
59+
<dependency>
60+
<groupId>io.grpc</groupId>
61+
<artifactId>grpc-protobuf</artifactId>
62+
</dependency>
63+
<dependency>
64+
<groupId>io.grpc</groupId>
65+
<artifactId>grpc-stub</artifactId>
66+
</dependency>
67+
<dependency>
68+
<groupId>io.grpc</groupId>
69+
<artifactId>grpc-grpclb</artifactId>
70+
</dependency>
71+
<dependency>
72+
<groupId>io.grpc</groupId>
73+
<artifactId>grpc-util</artifactId>
74+
</dependency>
75+
</dependencies>
76+
<build>
77+
<plugins>
78+
<plugin>
79+
<groupId>org.apache.maven.plugins</groupId>
80+
<artifactId>maven-shade-plugin</artifactId>
81+
<executions>
82+
<execution>
83+
<phase>package</phase>
84+
<goals>
85+
<goal>shade</goal>
86+
</goals>
87+
<configuration>
88+
<createDependencyReducedPom>true</createDependencyReducedPom>
89+
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
90+
<minimizeJar>false</minimizeJar>
91+
<artifactSet>
92+
<includes>
93+
<include>io.etcd:*</include>
94+
<include>io.vertx:*</include>
95+
</includes>
96+
</artifactSet>
97+
<relocations>
98+
<!-- relocate vertx packages since they will be transformed to use grpc-netty-shaded packages -->
99+
<relocation>
100+
<pattern>io.vertx</pattern>
101+
<shadedPattern>org.apache.pulsar.jetcd.shaded.io.vertx</shadedPattern>
102+
</relocation>
103+
<!-- relocate to use grpc-netty-shaded packages -->
104+
<relocation>
105+
<pattern>io.grpc.netty</pattern>
106+
<shadedPattern>io.grpc.netty.shaded.io.grpc.netty</shadedPattern>
107+
</relocation>
108+
<!-- relocate to use grpc-netty-shaded packages -->
109+
<relocation>
110+
<pattern>io.netty</pattern>
111+
<shadedPattern>io.grpc.netty.shaded.io.netty</shadedPattern>
112+
</relocation>
113+
</relocations>
114+
<filters>
115+
<filter>
116+
<artifact>*:*</artifact>
117+
<excludes>
118+
<exclude>META-INF/*.SF</exclude>
119+
<exclude>META-INF/*.DSA</exclude>
120+
<exclude>META-INF/*.RSA</exclude>
121+
<exclude>META-INF/maven/${project.groupId}/${project.artifactId}/pom.xml</exclude>
122+
</excludes>
123+
</filter>
124+
</filters>
125+
<transformers>
126+
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
127+
<transformer implementation="org.apache.maven.plugins.shade.resource.PluginXmlResourceTransformer"/>
128+
<transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
129+
<resource>META-INF/maven/${project.groupId}/${project.artifactId}/pom.xml</resource>
130+
<file>${project.basedir}/dependency-reduced-pom.xml</file>
131+
</transformer>
132+
</transformers>
133+
<!-- required for IntelliJ support -->
134+
<shadedArtifactAttached>true</shadedArtifactAttached>
135+
<shadedClassifierName>shaded</shadedClassifierName>
136+
</configuration>
137+
</execution>
138+
</executions>
139+
</plugin>
140+
<!-- required for IntelliJ support, for some reason shadedArtifactAttached isn't sufficient alone -->
141+
<plugin>
142+
<groupId>org.codehaus.mojo</groupId>
143+
<artifactId>build-helper-maven-plugin</artifactId>
144+
<executions>
145+
<execution>
146+
<id>attach-shaded-jar</id>
147+
<phase>package</phase>
148+
<goals>
149+
<goal>attach-artifact</goal>
150+
</goals>
151+
<configuration>
152+
<artifacts>
153+
<artifact>
154+
<file>${project.build.directory}/${project.artifactId}-${project.version}-shaded.jar</file>
155+
<type>jar</type>
156+
<classifier>shaded</classifier>
157+
</artifact>
158+
</artifacts>
159+
</configuration>
160+
</execution>
161+
</executions>
162+
</plugin>
163+
<!-- required for running tests in subproject -->
164+
<plugin>
165+
<groupId>org.apache.maven.plugins</groupId>
166+
<artifactId>maven-antrun-plugin</artifactId>
167+
<version>${maven-antrun-plugin.version}</version>
168+
<executions>
169+
<execution>
170+
<id>unpack-shaded-jar</id>
171+
<phase>package</phase>
172+
<goals>
173+
<goal>run</goal>
174+
</goals>
175+
<configuration>
176+
<target>
177+
<unzip src="${project.build.directory}/${project.artifactId}-${project.version}-shaded.jar"
178+
dest="${project.build.outputDirectory}"
179+
overwrite="true" />
180+
</target>
181+
</configuration>
182+
</execution>
183+
</executions>
184+
</plugin>
185+
</plugins>
186+
</build>
187+
</project>

0 commit comments

Comments
 (0)