Skip to content

Commit

Permalink
HIVE-23073 : Shade netty and upgrade to netty 4.1.48.Final (Laszlo Bo…
Browse files Browse the repository at this point in the history
…dor via Ashutosh Chauhan)

Signed-off-by: Ashutosh Chauhan <hashutosh@apache.org>
  • Loading branch information
abstractdog authored and ashutoshc committed Apr 13, 2020
1 parent 8259a21 commit c1836f0
Show file tree
Hide file tree
Showing 12 changed files with 103 additions and 16 deletions.
17 changes: 11 additions & 6 deletions druid-handler/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,7 @@
<exclusions>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty</artifactId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.guava</groupId>
Expand Down Expand Up @@ -85,6 +81,11 @@
<artifactId>joda-time</artifactId>
<version>${joda.version}</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty</artifactId>
<version>${netty3.version}</version>
</dependency>
<dependency>
<groupId>org.apache.druid</groupId>
<artifactId>druid-server</artifactId>
Expand All @@ -106,6 +107,10 @@
<groupId>org.apache.druid</groupId>
<artifactId>druid-aws-common</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
<optional>true</optional>
</dependency>
Expand Down Expand Up @@ -214,7 +219,7 @@
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty</artifactId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.guava</groupId>
Expand Down
12 changes: 12 additions & 0 deletions itests/qtest-druid/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@
<artifactId>jersey-core</artifactId>
<groupId>com.sun.jersey</groupId>
</exclusion>
<exclusion>
<groupId>org.jboss.netty</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand All @@ -83,6 +87,10 @@
<artifactId>jersey-core</artifactId>
<groupId>com.sun.jersey</groupId>
</exclusion>
<exclusion>
<groupId>org.jboss.netty</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down Expand Up @@ -266,6 +274,10 @@
<pattern>org.apache.kafka</pattern>
<shadedPattern>org.apache.kafkatests</shadedPattern>
</relocation>
<relocation>
<pattern>org.jboss.netty</pattern>
<shadedPattern>org.apache.hive.druid.org.jboss.netty</shadedPattern>
</relocation>
</relocations>
<filters>
<filter>
Expand Down
10 changes: 10 additions & 0 deletions itests/qtest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,12 @@
<artifactId>hadoop-hdfs</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
<version>${netty.hadoop.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-mapreduce-client-jobclient</artifactId>
Expand Down Expand Up @@ -395,6 +401,10 @@
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down
4 changes: 4 additions & 0 deletions itests/util/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,10 @@
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import java.net.URL;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Deque;
import java.util.HashSet;
import java.util.LinkedList;
Expand Down Expand Up @@ -183,6 +184,8 @@ public QTestUtil(QTestArguments testArgs) throws Exception {
testArgs.isWithLlapIo(),
testArgs.getFsType());

logClassPath();

Preconditions.checkNotNull(testArgs.getClusterType(), "ClusterType cannot be null");

this.fsType = testArgs.getFsType();
Expand Down Expand Up @@ -229,6 +232,12 @@ public QTestUtil(QTestArguments testArgs) throws Exception {

}

private void logClassPath() {
String classpath = System.getProperty("java.class.path");
String[] classpathEntries = classpath.split(File.pathSeparator);
LOG.info("QTestUtil classpath: " + String.join("\n", Arrays.asList(classpathEntries)));
}

private void setMetaStoreProperties() {
setMetastoreConfPropertyFromSystemProperty(MetastoreConf.ConfVars.CONNECT_URL_KEY);
setMetastoreConfPropertyFromSystemProperty(MetastoreConf.ConfVars.CONNECTION_DRIVER);
Expand Down
9 changes: 6 additions & 3 deletions jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@
<version>${zookeeper.version}</version>
<exclusions>
<exclusion>
<groupId>org.jboss.netty</groupId>
<artifactId>netty</artifactId>
<groupId>io.netty</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
Expand Down Expand Up @@ -244,7 +244,6 @@
<exclude>com.zaxxer:*</exclude>
<exclude>io.airlift:*</exclude>
<exclude>io.dropwizard.metrics:*</exclude>
<exclude>io.netty:*</exclude>
<exclude>javax.activation:*</exclude>
<exclude>javax.inject:*</exclude>
<exclude>javax.jdo:*</exclude>
Expand Down Expand Up @@ -354,6 +353,10 @@
<pattern>javolution</pattern>
<shadedPattern>org.apache.hive.javolution</shadedPattern>
</relocation>
<relocation>
<pattern>io.netty</pattern>
<shadedPattern>org.apache.hive.io.netty</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
Expand Down
20 changes: 15 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,9 @@
<mockito-core.version>1.10.19</mockito-core.version>
<powermock.version>1.7.4</powermock.version>
<mina.version>2.0.0-M5</mina.version>
<netty.version>4.1.17.Final</netty.version>
<netty.version>4.1.48.Final</netty.version>
<netty3.version>3.10.5.Final</netty3.version>
<netty.hadoop.version>4.0.52.Final</netty.hadoop.version>
<parquet.version>1.11.0</parquet.version>
<pig.version>0.16.0</pig.version>
<plexus.version>1.5.6</plexus.version>
Expand Down Expand Up @@ -603,8 +604,8 @@
<artifactId>httpclient</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.netty</groupId>
<artifactId>netty</artifactId>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
</exclusion>
</exclusions>
</dependency>
Expand Down Expand Up @@ -934,8 +935,8 @@
<artifactId>jruby-complete</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.netty</groupId>
<artifactId>netty</artifactId>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
Expand Down Expand Up @@ -1041,6 +1042,11 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty</artifactId>
<version>${netty3.version}</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
Expand All @@ -1050,6 +1056,10 @@
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
Expand Down
12 changes: 12 additions & 0 deletions ql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1020,6 +1020,14 @@
<include>org.apache.datasketches:*</include>
<include>org.apache.calcite:*</include>
<include>org.apache.calcite.avatica:avatica</include>
<include>io.netty:*</include>
<!-- some netty-based classes are included in arrow jars with original
io.netty package name (e.g. io.netty.buffer.ArrowBuf in arrow-memory)
so we should include them in the shaded jars in order to make shade plugin
be triggered on them, but we should not relocate arrow (this is why arrow
is not included in relocations)
-->
<include>org.apache.arrow:*</include>
</includes>
</artifactSet>
<relocations>
Expand Down Expand Up @@ -1055,6 +1063,10 @@
<pattern>org.apache.datasketches</pattern>
<shadedPattern>org.apache.hive.org.apache.datasketches</shadedPattern>
</relocation>
<relocation>
<pattern>io.netty</pattern>
<shadedPattern>org.apache.hive.io.netty</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
Expand Down
6 changes: 6 additions & 0 deletions serde/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@
<groupId>org.apache.arrow</groupId>
<artifactId>arrow-vector</artifactId>
<version>${arrow.version}</version>
<exclusions>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.carrotsearch</groupId>
Expand Down
12 changes: 10 additions & 2 deletions standalone-metastore/metastore-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@
<groupId>org.apache.hive</groupId>
<artifactId>hive-storage-api</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down Expand Up @@ -141,6 +145,10 @@
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down Expand Up @@ -229,8 +237,8 @@
<artifactId>httpclient</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.netty</groupId>
<artifactId>netty</artifactId>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
</exclusion>
</exclusions>
</dependency>
Expand Down
4 changes: 4 additions & 0 deletions standalone-metastore/metastore-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@
<groupId>org.apache.curator</groupId>
<artifactId>curator-recipes</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-log4j12 -->
Expand Down

0 comments on commit c1836f0

Please sign in to comment.