This is an automated email from the ASF dual-hosted git repository.

chengpan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kyuubi-shaded.git


The following commit(s) were added to refs/heads/master by this push:
     new 14551fc  [KYUUBI-SHADED #37] Split Thrift out from relocated 
hive-service-rpc
14551fc is described below

commit 14551fc3c36d4294f200862aecdc804201c27938
Author: Cheng Pan <[email protected]>
AuthorDate: Thu Feb 29 14:52:12 2024 +0800

    [KYUUBI-SHADED #37] Split Thrift out from relocated hive-service-rpc
    
    ### _Why are the changes needed?_
    
    Prepare to be re-used by relocated hive-metastore-client
    
    ### _How was this patch tested?_
    - [ ] Add some test cases that check the changes thoroughly including 
negative and positive cases if possible
    
    - [ ] Add screenshots for manual tests if appropriate
    
    - [ ] [Run 
test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests)
 locally before make a pull request
    
    Closes #37 from pan3793/split-thrift.
    
    be194a0 [Cheng Pan] Split thrift out from relocated hive-service-rpc
    
    Authored-by: Cheng Pan <[email protected]>
    Signed-off-by: Cheng Pan <[email protected]>
---
 kyuubi-relocated-hive-service-rpc/pom.xml          | 26 +-----------
 .../src/main/resources/META-INF/NOTICE             |  2 -
 .../pom.xml                                        | 49 ++++++++++++----------
 .../src/main/resources/META-INF/NOTICE             |  3 +-
 pom.xml                                            |  1 +
 5 files changed, 30 insertions(+), 51 deletions(-)

diff --git a/kyuubi-relocated-hive-service-rpc/pom.xml 
b/kyuubi-relocated-hive-service-rpc/pom.xml
index 74ea664..713fa47 100644
--- a/kyuubi-relocated-hive-service-rpc/pom.xml
+++ b/kyuubi-relocated-hive-service-rpc/pom.xml
@@ -29,12 +29,10 @@ under the License.
     </parent>
 
     <artifactId>kyuubi-relocated-hive-service-rpc</artifactId>
-    <description>Relocated Hive Service RPC and Thrift classes used by Kyuubi 
internally.</description>
+    <description>Relocated Hive Service RPC classes used by Kyuubi 
internally.</description>
 
     <properties>
         <hive.service.rpc.version>3.1.3</hive.service.rpc.version>
-        <fb303.version>0.9.3</fb303.version>
-        <thrift.version>0.9.3-1</thrift.version>
     </properties>
 
     <dependencies>
@@ -49,28 +47,6 @@ under the License.
                 </exclusion>
             </exclusions>
         </dependency>
-        <dependency>
-            <groupId>org.apache.thrift</groupId>
-            <artifactId>libfb303</artifactId>
-            <version>${fb303.version}</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.apache.thrift</groupId>
-                    <artifactId>libthrift</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.thrift</groupId>
-            <artifactId>libthrift</artifactId>
-            <version>${thrift.version}</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>*</groupId>
-                    <artifactId>*</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
     </dependencies>
 
     <build>
diff --git 
a/kyuubi-relocated-hive-service-rpc/src/main/resources/META-INF/NOTICE 
b/kyuubi-relocated-hive-service-rpc/src/main/resources/META-INF/NOTICE
index 8a03062..f4505ac 100644
--- a/kyuubi-relocated-hive-service-rpc/src/main/resources/META-INF/NOTICE
+++ b/kyuubi-relocated-hive-service-rpc/src/main/resources/META-INF/NOTICE
@@ -7,5 +7,3 @@ The Apache Software Foundation (https://www.apache.org/).
 This project bundles the following dependencies under the Apache Software 
License 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt)
 
 - org.apache.hive:hive-service-rpc:3.1.3
-- org.apache.thrift:libfb303:0.9.3
-- org.apache.thrift:libthrift:0.9.3-1
diff --git a/kyuubi-relocated-hive-service-rpc/pom.xml 
b/kyuubi-relocated-thrift/pom.xml
similarity index 81%
copy from kyuubi-relocated-hive-service-rpc/pom.xml
copy to kyuubi-relocated-thrift/pom.xml
index 74ea664..1c32445 100644
--- a/kyuubi-relocated-hive-service-rpc/pom.xml
+++ b/kyuubi-relocated-thrift/pom.xml
@@ -28,27 +28,15 @@ under the License.
         <version>0.3.0-SNAPSHOT</version>
     </parent>
 
-    <artifactId>kyuubi-relocated-hive-service-rpc</artifactId>
-    <description>Relocated Hive Service RPC and Thrift classes used by Kyuubi 
internally.</description>
+    <artifactId>kyuubi-relocated-thrift</artifactId>
+    <description>Relocated Thrift classes used by Kyuubi 
internally.</description>
 
     <properties>
-        <hive.service.rpc.version>3.1.3</hive.service.rpc.version>
         <fb303.version>0.9.3</fb303.version>
         <thrift.version>0.9.3-1</thrift.version>
     </properties>
 
     <dependencies>
-        <dependency>
-            <groupId>org.apache.hive</groupId>
-            <artifactId>hive-service-rpc</artifactId>
-            <version>${hive.service.rpc.version}</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>*</groupId>
-                    <artifactId>*</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
         <dependency>
             <groupId>org.apache.thrift</groupId>
             <artifactId>libfb303</artifactId>
@@ -113,13 +101,6 @@ under the License.
                                 </filter>
                             </filters>
                             <relocations>
-                                <relocation>
-                                    
<pattern>org.apache.hive.service.rpc.thrift</pattern>
-                                    
<shadedPattern>${shading.prefix}.hive.service.rpc.thrift</shadedPattern>
-                                    <includes>
-                                        
<include>org.apache.hive.service.rpc.thrift.**</include>
-                                    </includes>
-                                </relocation>
                                 <relocation>
                                     <pattern>com.facebook.fb303</pattern>
                                     
<shadedPattern>${shading.prefix}.fb303</shadedPattern>
@@ -145,7 +126,31 @@ under the License.
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>flatten-maven-plugin</artifactId>
             </plugin>
+
+            <plugin>
+                <!-- This is to ensure references to shaded classes can be 
resolved in IDEs such as
+                  Intellij. For reference: 
https://youtrack.jetbrains.com/issue/IDEA-126596 -->
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>compile</id>
+                        <goals>
+                            <goal>attach-artifact</goal>
+                        </goals>
+                        <phase>package</phase>
+                        <configuration>
+                            <artifacts>
+                                <artifact>
+                                    
<file>${basedir}/target/${project.artifactId}-${project.version}.jar</file>
+                                    <type>jar</type>
+                                    <classifier>optional</classifier>
+                                </artifact>
+                            </artifacts>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>
-
 </project>
diff --git 
a/kyuubi-relocated-hive-service-rpc/src/main/resources/META-INF/NOTICE 
b/kyuubi-relocated-thrift/src/main/resources/META-INF/NOTICE
similarity index 82%
copy from kyuubi-relocated-hive-service-rpc/src/main/resources/META-INF/NOTICE
copy to kyuubi-relocated-thrift/src/main/resources/META-INF/NOTICE
index 8a03062..977fbda 100644
--- a/kyuubi-relocated-hive-service-rpc/src/main/resources/META-INF/NOTICE
+++ b/kyuubi-relocated-thrift/src/main/resources/META-INF/NOTICE
@@ -1,4 +1,4 @@
-kyuubi-relocated-hive-service-rpc
+kyuubi-relocated-thrift
 Copyright 2023-2024 The Apache Software Foundation
 
 This product includes software developed at
@@ -6,6 +6,5 @@ The Apache Software Foundation (https://www.apache.org/).
 
 This project bundles the following dependencies under the Apache Software 
License 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt)
 
-- org.apache.hive:hive-service-rpc:3.1.3
 - org.apache.thrift:libfb303:0.9.3
 - org.apache.thrift:libthrift:0.9.3-1
diff --git a/pom.xml b/pom.xml
index a4d1320..e763202 100644
--- a/pom.xml
+++ b/pom.xml
@@ -54,6 +54,7 @@
         <module>kyuubi-relocated-force-shading</module>
         <module>kyuubi-relocated-hive-metastore-client</module>
         <module>kyuubi-relocated-hive-service-rpc</module>
+        <module>kyuubi-relocated-thrift</module>
         <module>kyuubi-relocated-zookeeper-parent</module>
     </modules>
 

Reply via email to