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 e667499  [KYUUBI-SHADED #48] Remove unused annotations for HMS client 
generated thrift code
e667499 is described below

commit e66749966def750125580d5e5f2f8edd85886ad0
Author: Cheng Pan <cheng...@apache.org>
AuthorDate: Mon Aug 19 15:03:36 2024 +0800

    [KYUUBI-SHADED #48] Remove unused annotations for HMS client generated 
thrift code
    
    ### _Why are the changes needed?_
    
    Change thrift arg `generated_annotations` from `undated` to `suppress` to 
remove the following annotation, to make it compilable without additional 
dependency for Java 11+
    ```
    javax.annotation.Generated(value = "Autogenerated by Thrift Compiler 
(0.16.0)")
    ```
    
    Remove Hadoop classification annotations, it is only used for Hadoop 
project to generate Javadocs, useless for us.
    
    ### _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
    
    - [x] [Run 
test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests)
 locally before make a pull request
    
    Closes #48 from pan3793/thrift-ann.
    
    4781e6a [Cheng Pan] 17
    ea9c8d3 [Cheng Pan] Remove unused annotations for HMS client generated 
thrift code
    
    Authored-by: Cheng Pan <cheng...@apache.org>
    Signed-off-by: Cheng Pan <cheng...@apache.org>
---
 .github/workflows/master.yml                       |  4 ++-
 kyuubi-relocated-hive-metastore-client/pom.xml     | 30 +---------------------
 .../shaded/hive/metastore/api/MetaException.java   |  3 +--
 .../hive/metastore/api/ThriftHiveMetastore.java    | 29 ++++++++++-----------
 4 files changed, 19 insertions(+), 47 deletions(-)

diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml
index f1625ef..6d5f2df 100644
--- a/.github/workflows/master.yml
+++ b/.github/workflows/master.yml
@@ -40,13 +40,15 @@ jobs:
     runs-on: ubuntu-22.04
     strategy:
       fail-fast: false
+      matrix:
+        java: [8, 17]
     steps:
       - uses: actions/checkout@v3
       - name: Setup JDK ${{ matrix.java }}
         uses: actions/setup-java@v3
         with:
           distribution: temurin
-          java-version: 8
+          java-version: ${{ matrix.java }}
           cache: 'maven'
           check-latest: false
       - name: Setup Maven
diff --git a/kyuubi-relocated-hive-metastore-client/pom.xml 
b/kyuubi-relocated-hive-metastore-client/pom.xml
index 0aba2e3..9e810c2 100644
--- a/kyuubi-relocated-hive-metastore-client/pom.xml
+++ b/kyuubi-relocated-hive-metastore-client/pom.xml
@@ -43,7 +43,7 @@ under the License.
         <thrift.home>you-must-set-this-to-run-thrift</thrift.home>
         <thrift.file>src/main/thrift/hive_metastore.thrift</thrift.file>
         <thrift.gen.dir>${basedir}/src/gen/thrift</thrift.gen.dir>
-        <thrift.args>-I ${thrift.home} -strict --gen 
java:beans,generated_annotations=undated</thrift.args>
+        <thrift.args>-I ${thrift.home} -strict --gen 
java:beans,generated_annotations=suppress</thrift.args>
     </properties>
 
     <dependencies>
@@ -179,34 +179,6 @@ under the License.
                                     <quiet>false</quiet>
                                 </configuration>
                             </execution>
-                            <execution>
-                                
<id>process-thrift-sources-interface-annotations</id>
-                                <goals>
-                                    <goal>replace</goal>
-                                </goals>
-                                <phase>process-sources</phase>
-                                <configuration>
-                                    
<basedir>${basedir}/src/gen/thrift/gen-javabean/org/apache/kyuubi/shaded/hive/metastore/api/</basedir>
-                                    <filesToInclude>*.java</filesToInclude>
-                                    <replacements>
-                                        <replacement>
-                                            <token>public class</token>
-                                            
<value>@org.apache.hadoop.classification.InterfaceAudience.Public 
@org.apache.hadoop.classification.InterfaceStability.Stable public class</value>
-                                            <unescape>true</unescape>
-                                        </replacement>
-                                        <replacement>
-                                            <token>public static class</token>
-                                            
<value>@org.apache.hadoop.classification.InterfaceAudience.Public 
@org.apache.hadoop.classification.InterfaceStability.Stable public static 
class</value>
-                                            <unescape>true</unescape>
-                                        </replacement>
-                                        <replacement>
-                                            <token>public interface</token>
-                                            
<value>@org.apache.hadoop.classification.InterfaceAudience.Public 
@org.apache.hadoop.classification.InterfaceStability.Stable public 
interface</value>
-                                            <unescape>true</unescape>
-                                        </replacement>
-                                    </replacements>
-                                </configuration>
-                            </execution>
                         </executions>
                     </plugin>
                 </plugins>
diff --git 
a/kyuubi-relocated-hive-metastore-client/src/gen/thrift/gen-javabean/org/apache/kyuubi/shaded/hive/metastore/api/MetaException.java
 
b/kyuubi-relocated-hive-metastore-client/src/gen/thrift/gen-javabean/org/apache/kyuubi/shaded/hive/metastore/api/MetaException.java
index b73c98c..19a75c1 100644
--- 
a/kyuubi-relocated-hive-metastore-client/src/gen/thrift/gen-javabean/org/apache/kyuubi/shaded/hive/metastore/api/MetaException.java
+++ 
b/kyuubi-relocated-hive-metastore-client/src/gen/thrift/gen-javabean/org/apache/kyuubi/shaded/hive/metastore/api/MetaException.java
@@ -7,8 +7,7 @@
 package org.apache.kyuubi.shaded.hive.metastore.api;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler 
(0.16.0)")
-@org.apache.hadoop.classification.InterfaceAudience.Public 
@org.apache.hadoop.classification.InterfaceStability.Stable public class 
MetaException extends org.apache.kyuubi.shaded.thrift.TException implements 
org.apache.kyuubi.shaded.thrift.TBase<MetaException, MetaException._Fields>, 
java.io.Serializable, Cloneable, Comparable<MetaException> {
+public class MetaException extends org.apache.kyuubi.shaded.thrift.TException 
implements org.apache.kyuubi.shaded.thrift.TBase<MetaException, 
MetaException._Fields>, java.io.Serializable, Cloneable, 
Comparable<MetaException> {
   private static final org.apache.kyuubi.shaded.thrift.protocol.TStruct 
STRUCT_DESC = new 
org.apache.kyuubi.shaded.thrift.protocol.TStruct("MetaException");
 
   private static final org.apache.kyuubi.shaded.thrift.protocol.TField 
MESSAGE_FIELD_DESC = new 
org.apache.kyuubi.shaded.thrift.protocol.TField("message", 
org.apache.kyuubi.shaded.thrift.protocol.TType.STRING, (short)1);
diff --git 
a/kyuubi-relocated-hive-metastore-client/src/gen/thrift/gen-javabean/org/apache/kyuubi/shaded/hive/metastore/api/ThriftHiveMetastore.java
 
b/kyuubi-relocated-hive-metastore-client/src/gen/thrift/gen-javabean/org/apache/kyuubi/shaded/hive/metastore/api/ThriftHiveMetastore.java
index c566f46..1db4b6e 100644
--- 
a/kyuubi-relocated-hive-metastore-client/src/gen/thrift/gen-javabean/org/apache/kyuubi/shaded/hive/metastore/api/ThriftHiveMetastore.java
+++ 
b/kyuubi-relocated-hive-metastore-client/src/gen/thrift/gen-javabean/org/apache/kyuubi/shaded/hive/metastore/api/ThriftHiveMetastore.java
@@ -7,26 +7,25 @@
 package org.apache.kyuubi.shaded.hive.metastore.api;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler 
(0.16.0)")
-@org.apache.hadoop.classification.InterfaceAudience.Public 
@org.apache.hadoop.classification.InterfaceStability.Stable public class 
ThriftHiveMetastore {
+public class ThriftHiveMetastore {
 
   /**
    * This interface is live.
    */
-  @org.apache.hadoop.classification.InterfaceAudience.Public 
@org.apache.hadoop.classification.InterfaceStability.Stable public interface 
Iface extends org.apache.kyuubi.shaded.fb303.FacebookService.Iface {
+  public interface Iface extends 
org.apache.kyuubi.shaded.fb303.FacebookService.Iface {
 
     public java.lang.String get_delegation_token(java.lang.String token_owner, 
java.lang.String renewer_kerberos_principal_name) throws MetaException, 
org.apache.kyuubi.shaded.thrift.TException;
 
   }
 
-  @org.apache.hadoop.classification.InterfaceAudience.Public 
@org.apache.hadoop.classification.InterfaceStability.Stable public interface 
AsyncIface extends org.apache.kyuubi.shaded.fb303.FacebookService .AsyncIface {
+  public interface AsyncIface extends 
org.apache.kyuubi.shaded.fb303.FacebookService .AsyncIface {
 
     public void get_delegation_token(java.lang.String token_owner, 
java.lang.String renewer_kerberos_principal_name, 
org.apache.kyuubi.shaded.thrift.async.AsyncMethodCallback<java.lang.String> 
resultHandler) throws org.apache.kyuubi.shaded.thrift.TException;
 
   }
 
-  @org.apache.hadoop.classification.InterfaceAudience.Public 
@org.apache.hadoop.classification.InterfaceStability.Stable public static class 
Client extends org.apache.kyuubi.shaded.fb303.FacebookService.Client implements 
Iface {
-    @org.apache.hadoop.classification.InterfaceAudience.Public 
@org.apache.hadoop.classification.InterfaceStability.Stable public static class 
Factory implements 
org.apache.kyuubi.shaded.thrift.TServiceClientFactory<Client> {
+  public static class Client extends 
org.apache.kyuubi.shaded.fb303.FacebookService.Client implements Iface {
+    public static class Factory implements 
org.apache.kyuubi.shaded.thrift.TServiceClientFactory<Client> {
       public Factory() {}
       public Client 
getClient(org.apache.kyuubi.shaded.thrift.protocol.TProtocol prot) {
         return new Client(prot);
@@ -73,8 +72,8 @@ package org.apache.kyuubi.shaded.hive.metastore.api;
     }
 
   }
-  @org.apache.hadoop.classification.InterfaceAudience.Public 
@org.apache.hadoop.classification.InterfaceStability.Stable public static class 
AsyncClient extends org.apache.kyuubi.shaded.fb303.FacebookService.AsyncClient 
implements AsyncIface {
-    @org.apache.hadoop.classification.InterfaceAudience.Public 
@org.apache.hadoop.classification.InterfaceStability.Stable public static class 
Factory implements 
org.apache.kyuubi.shaded.thrift.async.TAsyncClientFactory<AsyncClient> {
+  public static class AsyncClient extends 
org.apache.kyuubi.shaded.fb303.FacebookService.AsyncClient implements 
AsyncIface {
+    public static class Factory implements 
org.apache.kyuubi.shaded.thrift.async.TAsyncClientFactory<AsyncClient> {
       private org.apache.kyuubi.shaded.thrift.async.TAsyncClientManager 
clientManager;
       private org.apache.kyuubi.shaded.thrift.protocol.TProtocolFactory 
protocolFactory;
       public Factory(org.apache.kyuubi.shaded.thrift.async.TAsyncClientManager 
clientManager, org.apache.kyuubi.shaded.thrift.protocol.TProtocolFactory 
protocolFactory) {
@@ -97,7 +96,7 @@ package org.apache.kyuubi.shaded.hive.metastore.api;
       ___manager.call(method_call);
     }
 
-    @org.apache.hadoop.classification.InterfaceAudience.Public 
@org.apache.hadoop.classification.InterfaceStability.Stable public static class 
get_delegation_token_call extends 
org.apache.kyuubi.shaded.thrift.async.TAsyncMethodCall<java.lang.String> {
+    public static class get_delegation_token_call extends 
org.apache.kyuubi.shaded.thrift.async.TAsyncMethodCall<java.lang.String> {
       private java.lang.String token_owner;
       private java.lang.String renewer_kerberos_principal_name;
       public get_delegation_token_call(java.lang.String token_owner, 
java.lang.String renewer_kerberos_principal_name, 
org.apache.kyuubi.shaded.thrift.async.AsyncMethodCallback<java.lang.String> 
resultHandler, org.apache.kyuubi.shaded.thrift.async.TAsyncClient client, 
org.apache.kyuubi.shaded.thrift.protocol.TProtocolFactory protocolFactory, 
org.apache.kyuubi.shaded.thrift.transport.TNonblockingTransport transport) 
throws org.apache.kyuubi.shaded.thrift.TException {
@@ -127,7 +126,7 @@ package org.apache.kyuubi.shaded.hive.metastore.api;
 
   }
 
-  @org.apache.hadoop.classification.InterfaceAudience.Public 
@org.apache.hadoop.classification.InterfaceStability.Stable public static class 
Processor<I extends Iface> extends 
org.apache.kyuubi.shaded.fb303.FacebookService.Processor<I> implements 
org.apache.kyuubi.shaded.thrift.TProcessor {
+  public static class Processor<I extends Iface> extends 
org.apache.kyuubi.shaded.fb303.FacebookService.Processor<I> implements 
org.apache.kyuubi.shaded.thrift.TProcessor {
     private static final org.slf4j.Logger _LOGGER = 
org.slf4j.LoggerFactory.getLogger(Processor.class.getName());
     public Processor(I iface) {
       super(iface, getProcessMap(new java.util.HashMap<java.lang.String, 
org.apache.kyuubi.shaded.thrift.ProcessFunction<I, ? extends 
org.apache.kyuubi.shaded.thrift.TBase>>()));
@@ -142,7 +141,7 @@ package org.apache.kyuubi.shaded.hive.metastore.api;
       return processMap;
     }
 
-    @org.apache.hadoop.classification.InterfaceAudience.Public 
@org.apache.hadoop.classification.InterfaceStability.Stable public static class 
get_delegation_token<I extends Iface> extends 
org.apache.kyuubi.shaded.thrift.ProcessFunction<I, get_delegation_token_args> {
+    public static class get_delegation_token<I extends Iface> extends 
org.apache.kyuubi.shaded.thrift.ProcessFunction<I, get_delegation_token_args> {
       public get_delegation_token() {
         super("get_delegation_token");
       }
@@ -173,7 +172,7 @@ package org.apache.kyuubi.shaded.hive.metastore.api;
 
   }
 
-  @org.apache.hadoop.classification.InterfaceAudience.Public 
@org.apache.hadoop.classification.InterfaceStability.Stable public static class 
AsyncProcessor<I extends AsyncIface> extends 
org.apache.kyuubi.shaded.fb303.FacebookService.AsyncProcessor<I> {
+  public static class AsyncProcessor<I extends AsyncIface> extends 
org.apache.kyuubi.shaded.fb303.FacebookService.AsyncProcessor<I> {
     private static final org.slf4j.Logger _LOGGER = 
org.slf4j.LoggerFactory.getLogger(AsyncProcessor.class.getName());
     public AsyncProcessor(I iface) {
       super(iface, getProcessMap(new java.util.HashMap<java.lang.String, 
org.apache.kyuubi.shaded.thrift.AsyncProcessFunction<I, ? extends 
org.apache.kyuubi.shaded.thrift.TBase, ?>>()));
@@ -188,7 +187,7 @@ package org.apache.kyuubi.shaded.hive.metastore.api;
       return processMap;
     }
 
-    @org.apache.hadoop.classification.InterfaceAudience.Public 
@org.apache.hadoop.classification.InterfaceStability.Stable public static class 
get_delegation_token<I extends AsyncIface> extends 
org.apache.kyuubi.shaded.thrift.AsyncProcessFunction<I, 
get_delegation_token_args, java.lang.String> {
+    public static class get_delegation_token<I extends AsyncIface> extends 
org.apache.kyuubi.shaded.thrift.AsyncProcessFunction<I, 
get_delegation_token_args, java.lang.String> {
       public get_delegation_token() {
         super("get_delegation_token");
       }
@@ -255,7 +254,7 @@ package org.apache.kyuubi.shaded.hive.metastore.api;
 
   }
 
-  @org.apache.hadoop.classification.InterfaceAudience.Public 
@org.apache.hadoop.classification.InterfaceStability.Stable public static class 
get_delegation_token_args implements 
org.apache.kyuubi.shaded.thrift.TBase<get_delegation_token_args, 
get_delegation_token_args._Fields>, java.io.Serializable, Cloneable, 
Comparable<get_delegation_token_args>   {
+  public static class get_delegation_token_args implements 
org.apache.kyuubi.shaded.thrift.TBase<get_delegation_token_args, 
get_delegation_token_args._Fields>, java.io.Serializable, Cloneable, 
Comparable<get_delegation_token_args>   {
     private static final org.apache.kyuubi.shaded.thrift.protocol.TStruct 
STRUCT_DESC = new 
org.apache.kyuubi.shaded.thrift.protocol.TStruct("get_delegation_token_args");
 
     private static final org.apache.kyuubi.shaded.thrift.protocol.TField 
TOKEN_OWNER_FIELD_DESC = new 
org.apache.kyuubi.shaded.thrift.protocol.TField("token_owner", 
org.apache.kyuubi.shaded.thrift.protocol.TType.STRING, (short)1);
@@ -721,7 +720,7 @@ package org.apache.kyuubi.shaded.hive.metastore.api;
     }
   }
 
-  @org.apache.hadoop.classification.InterfaceAudience.Public 
@org.apache.hadoop.classification.InterfaceStability.Stable public static class 
get_delegation_token_result implements 
org.apache.kyuubi.shaded.thrift.TBase<get_delegation_token_result, 
get_delegation_token_result._Fields>, java.io.Serializable, Cloneable, 
Comparable<get_delegation_token_result>   {
+  public static class get_delegation_token_result implements 
org.apache.kyuubi.shaded.thrift.TBase<get_delegation_token_result, 
get_delegation_token_result._Fields>, java.io.Serializable, Cloneable, 
Comparable<get_delegation_token_result>   {
     private static final org.apache.kyuubi.shaded.thrift.protocol.TStruct 
STRUCT_DESC = new 
org.apache.kyuubi.shaded.thrift.protocol.TStruct("get_delegation_token_result");
 
     private static final org.apache.kyuubi.shaded.thrift.protocol.TField 
SUCCESS_FIELD_DESC = new 
org.apache.kyuubi.shaded.thrift.protocol.TField("success", 
org.apache.kyuubi.shaded.thrift.protocol.TType.STRING, (short)0);

Reply via email to