LuciferYang commented on code in PR #38944:
URL: https://github.com/apache/spark/pull/38944#discussion_r1044163985


##########
connector/connect/common/pom.xml:
##########
@@ -0,0 +1,225 @@
+<?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/xsd/maven-4.0.0.xsd";>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.spark</groupId>
+        <artifactId>spark-parent_2.12</artifactId>
+        <version>3.4.0-SNAPSHOT</version>
+        <relativePath>../../../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>spark-connect-common_2.12</artifactId>
+    <packaging>jar</packaging>
+    <name>Spark Project Connect Common</name>
+    <url>https://spark.apache.org/</url>
+    <properties>
+        <sbt.project.name>connect-common</sbt.project.name>
+        <guava.version>31.0.1-jre</guava.version>
+        <guava.failureaccess.version>1.0.1</guava.failureaccess.version>
+        <io.grpc.version>1.47.0</io.grpc.version>
+        <tomcat.annotations.api.version>6.0.53</tomcat.annotations.api.version>
+    </properties>
+    <dependencies>
+        <dependency>
+            <groupId>org.scala-lang</groupId>
+            <artifactId>scala-library</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.google.guava</groupId>

Review Comment:
   I have this question because I found that the `common` module shade guava 
31.0.1-jre, 
   ```
   [INFO] --- maven-shade-plugin:3.2.4:shade (default) @ 
spark-connect-common_2.12 ---
   [INFO] Including com.google.guava:guava:jar:31.0.1-jre in the shaded jar.
   [INFO] Including org.spark-project.spark:unused:jar:1.0.0 in the shaded jar.
   
   ```
   
   but some classes have not been relocated:
   
   ```
      creating: com/
      creating: com/google/
      creating: com/google/thirdparty/
      creating: com/google/thirdparty/publicsuffix/
     inflating: com/google/thirdparty/publicsuffix/PublicSuffixPatterns.class  
     inflating: com/google/thirdparty/publicsuffix/PublicSuffixType.class  
     inflating: com/google/thirdparty/publicsuffix/TrieParser.class  
   ```
   
   and the `serve`r module does not share+relocate guava, which is different 
from the previous:
   
   ```
   [INFO] Including com.google.code.gson:gson:jar:2.8.9 in the shaded jar.
   [INFO] Including 
org.apache.spark:spark-connect-common_2.12:jar:3.4.0-SNAPSHOT in the shaded jar.
   [INFO] Including com.google.errorprone:error_prone_annotations:jar:2.7.1 in 
the shaded jar.
   [INFO] Including com.google.j2objc:j2objc-annotations:jar:1.3 in the shaded 
jar.
   [INFO] Including com.google.guava:failureaccess:jar:1.0.1 in the shaded jar.
   [INFO] Including io.grpc:grpc-netty:jar:1.47.0 in the shaded jar.
   [INFO] Including io.grpc:grpc-core:jar:1.47.0 in the shaded jar.
   [INFO] Including com.google.android:annotations:jar:4.1.1.4 in the shaded 
jar.
   [INFO] Including org.codehaus.mojo:animal-sniffer-annotations:jar:1.19 in 
the shaded jar.
   [INFO] Including io.perfmark:perfmark-api:jar:0.25.0 in the shaded jar.
   [INFO] Including io.grpc:grpc-protobuf:jar:1.47.0 in the shaded jar.
   [INFO] Including io.grpc:grpc-api:jar:1.47.0 in the shaded jar.
   [INFO] Including io.grpc:grpc-context:jar:1.47.0 in the shaded jar.
   [INFO] Including com.google.api.grpc:proto-google-common-protos:jar:2.0.1 in 
the shaded jar.
   [INFO] Including io.grpc:grpc-protobuf-lite:jar:1.47.0 in the shaded jar.
   [INFO] Including io.grpc:grpc-services:jar:1.47.0 in the shaded jar.
   [INFO] Including com.google.protobuf:protobuf-java-util:jar:3.19.2 in the 
shaded jar.
   [INFO] Including io.grpc:grpc-stub:jar:1.47.0 in the shaded jar.
   [INFO] Including com.google.protobuf:protobuf-java:jar:3.21.9 in the shaded 
jar.
   [INFO] Excluding org.apache.avro:avro:jar:1.11.1 from the shaded jar.
   ```
   
   also cc @HyukjinKwon 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to