Skip to content

Commit 84d4d3a

Browse files
lhotarinodece
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) Signed-off-by: Zixuan Liu <nodeces@gmail.com>
1 parent 43f720f commit 84d4d3a

File tree

11 files changed

+359
-82
lines changed

11 files changed

+359
-82
lines changed

buildtools/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
<maven-shade-plugin.version>3.4.0</maven-shade-plugin.version>
5454
<puppycrawl.checkstyle.version>8.37</puppycrawl.checkstyle.version>
5555
<maven-checkstyle-plugin.version>3.1.2</maven-checkstyle-plugin.version>
56-
<netty.version>4.1.108.Final</netty.version>
56+
<netty.version>4.1.111.Final</netty.version>
5757
<guice.version>4.2.3</guice.version>
5858
<guava.version>32.0.0-jre</guava.version>
5959
<ant.version>1.10.12</ant.version>

distribution/server/pom.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,19 @@
4040
<version>${project.version}</version>
4141
</dependency>
4242

43+
<dependency>
44+
<groupId>${project.groupId}</groupId>
45+
<artifactId>pulsar-metadata</artifactId>
46+
<version>${project.version}</version>
47+
</dependency>
48+
49+
<dependency>
50+
<groupId>${project.groupId}</groupId>
51+
<artifactId>jetcd-core-shaded</artifactId>
52+
<version>${project.version}</version>
53+
<classifier>shaded</classifier>
54+
</dependency>
55+
4356
<dependency>
4457
<groupId>${project.groupId}</groupId>
4558
<artifactId>pulsar-proxy</artifactId>

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

Lines changed: 40 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -352,27 +352,27 @@ The Apache Software License, Version 2.0
352352
- org.apache.commons-commons-compress-1.26.0.jar
353353
- org.apache.commons-commons-lang3-3.11.jar
354354
* Netty
355-
- io.netty-netty-buffer-4.1.108.Final.jar
356-
- io.netty-netty-codec-4.1.108.Final.jar
357-
- io.netty-netty-codec-dns-4.1.108.Final.jar
358-
- io.netty-netty-codec-http-4.1.108.Final.jar
359-
- io.netty-netty-codec-http2-4.1.108.Final.jar
360-
- io.netty-netty-codec-socks-4.1.108.Final.jar
361-
- io.netty-netty-codec-haproxy-4.1.108.Final.jar
362-
- io.netty-netty-common-4.1.108.Final.jar
363-
- io.netty-netty-handler-4.1.108.Final.jar
364-
- io.netty-netty-handler-proxy-4.1.108.Final.jar
365-
- io.netty-netty-resolver-4.1.108.Final.jar
366-
- io.netty-netty-resolver-dns-4.1.108.Final.jar
367-
- io.netty-netty-resolver-dns-classes-macos-4.1.108.Final.jar
368-
- io.netty-netty-resolver-dns-native-macos-4.1.108.Final-osx-aarch_64.jar
369-
- io.netty-netty-resolver-dns-native-macos-4.1.108.Final-osx-x86_64.jar
370-
- io.netty-netty-transport-4.1.108.Final.jar
371-
- io.netty-netty-transport-classes-epoll-4.1.108.Final.jar
372-
- io.netty-netty-transport-native-epoll-4.1.108.Final-linux-aarch_64.jar
373-
- io.netty-netty-transport-native-epoll-4.1.108.Final-linux-x86_64.jar
374-
- io.netty-netty-transport-native-unix-common-4.1.108.Final.jar
375-
- io.netty-netty-transport-native-unix-common-4.1.108.Final-linux-x86_64.jar
355+
- io.netty-netty-buffer-4.1.111.Final.jar
356+
- io.netty-netty-codec-4.1.111.Final.jar
357+
- io.netty-netty-codec-dns-4.1.111.Final.jar
358+
- io.netty-netty-codec-http-4.1.111.Final.jar
359+
- io.netty-netty-codec-http2-4.1.111.Final.jar
360+
- io.netty-netty-codec-socks-4.1.111.Final.jar
361+
- io.netty-netty-codec-haproxy-4.1.111.Final.jar
362+
- io.netty-netty-common-4.1.111.Final.jar
363+
- io.netty-netty-handler-4.1.111.Final.jar
364+
- io.netty-netty-handler-proxy-4.1.111.Final.jar
365+
- io.netty-netty-resolver-4.1.111.Final.jar
366+
- io.netty-netty-resolver-dns-4.1.111.Final.jar
367+
- io.netty-netty-resolver-dns-classes-macos-4.1.111.Final.jar
368+
- io.netty-netty-resolver-dns-native-macos-4.1.111.Final-osx-aarch_64.jar
369+
- io.netty-netty-resolver-dns-native-macos-4.1.111.Final-osx-x86_64.jar
370+
- io.netty-netty-transport-4.1.111.Final.jar
371+
- io.netty-netty-transport-classes-epoll-4.1.111.Final.jar
372+
- io.netty-netty-transport-native-epoll-4.1.111.Final-linux-aarch_64.jar
373+
- io.netty-netty-transport-native-epoll-4.1.111.Final-linux-x86_64.jar
374+
- io.netty-netty-transport-native-unix-common-4.1.111.Final.jar
375+
- io.netty-netty-transport-native-unix-common-4.1.111.Final-linux-x86_64.jar
376376
- io.netty-netty-tcnative-boringssl-static-2.0.65.Final.jar
377377
- io.netty-netty-tcnative-boringssl-static-2.0.65.Final-linux-aarch_64.jar
378378
- io.netty-netty-tcnative-boringssl-static-2.0.65.Final-linux-x86_64.jar
@@ -476,22 +476,23 @@ The Apache Software License, Version 2.0
476476
- org.jetbrains.kotlin-kotlin-stdlib-jdk8-1.6.0.jar
477477
- org.jetbrains-annotations-13.0.jar
478478
* gRPC
479-
- io.grpc-grpc-all-1.45.1.jar
480-
- io.grpc-grpc-auth-1.45.1.jar
481-
- io.grpc-grpc-context-1.45.1.jar
482-
- io.grpc-grpc-core-1.45.1.jar
483-
- io.grpc-grpc-netty-1.45.1.jar
484-
- io.grpc-grpc-protobuf-1.45.1.jar
485-
- io.grpc-grpc-protobuf-lite-1.45.1.jar
486-
- io.grpc-grpc-stub-1.45.1.jar
487-
- io.grpc-grpc-alts-1.45.1.jar
488-
- io.grpc-grpc-api-1.45.1.jar
489-
- io.grpc-grpc-grpclb-1.45.1.jar
490-
- io.grpc-grpc-netty-shaded-1.45.1.jar
491-
- io.grpc-grpc-services-1.45.1.jar
492-
- io.grpc-grpc-xds-1.45.1.jar
493-
- io.grpc-grpc-rls-1.45.1.jar
494-
- com.google.auto.service-auto-service-annotations-1.0.jar
479+
- io.grpc-grpc-all-1.55.3.jar
480+
- io.grpc-grpc-auth-1.55.3.jar
481+
- io.grpc-grpc-context-1.55.3.jar
482+
- io.grpc-grpc-core-1.55.3.jar
483+
- io.grpc-grpc-protobuf-1.55.3.jar
484+
- io.grpc-grpc-protobuf-lite-1.55.3.jar
485+
- io.grpc-grpc-stub-1.55.3.jar
486+
- io.grpc-grpc-alts-1.55.3.jar
487+
- io.grpc-grpc-api-1.55.3.jar
488+
- io.grpc-grpc-grpclb-1.55.3.jar
489+
- io.grpc-grpc-netty-shaded-1.55.3.jar
490+
- io.grpc-grpc-services-1.55.3.jar
491+
- io.grpc-grpc-xds-1.55.3.jar
492+
- io.grpc-grpc-rls-1.55.3.jar
493+
- io.grpc-grpc-servlet-1.55.3.jar
494+
- io.grpc-grpc-servlet-jakarta-1.55.3.jar
495+
- io.grpc-grpc-util-1.60.0.jar
495496
* Perfmark
496497
- io.perfmark-perfmark-api-0.19.0.jar
497498
* OpenCensus
@@ -547,10 +548,8 @@ The Apache Software License, Version 2.0
547548
- com.google.http-client-google-http-client-gson-1.41.0.jar
548549
- com.google.http-client-google-http-client-1.41.0.jar
549550
- com.google.auto.value-auto-value-annotations-1.9.jar
550-
- com.google.re2j-re2j-1.5.jar
551-
* Jetcd
552-
- io.etcd-jetcd-common-0.5.11.jar
553-
- io.etcd-jetcd-core-0.5.11.jar
551+
- com.google.re2j-re2j-1.6.jar
552+
* Jetcd - shaded
554553
* IPAddress
555554
- com.github.seancfoley-ipaddress-5.3.3.jar
556555
* RoaringBitmap

jetcd-core-shaded/pom.xml

Lines changed: 187 additions & 0 deletions
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>org.apache.pulsar</groupId>
28+
<artifactId>pulsar</artifactId>
29+
<version>3.0.6-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)