You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ch...@apache.org on 2022/11/30 14:35:00 UTC

[incubator-kyuubi] branch master updated: [KYUUBI #3847] Add jdbc-shaded profile to support IDE debug

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/incubator-kyuubi.git


The following commit(s) were added to refs/heads/master by this push:
     new e49f77543 [KYUUBI #3847] Add jdbc-shaded profile to support IDE debug
e49f77543 is described below

commit e49f7754316263df6b4927aa3826ba2a781dab87
Author: sychen <sy...@ctrip.com>
AuthorDate: Wed Nov 30 22:33:28 2022 +0800

    [KYUUBI #3847] Add jdbc-shaded profile to support IDE debug
    
    ### _Why are the changes needed?_
    1. `mvn antrun:runbuild-info -pl kyuubi-common`
    2. debug engine suite
    
    ### _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.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request
    
    Closes #3847 from cxzl25/profile_jdbc_debug.
    
    Closes #3847
    
    e1c32067 [Cheng Pan] Merge branch 'master' into profile_jdbc_debug
    f41d3cd9 [sychen] use jdbc-shaded
    25b54b18 [sychen] use jdbc-shaded
    dd23f864 [sychen] use kyuubi-hive-jdbc as default
    79b0ffcb [sychen] add jdbc profile
    
    Lead-authored-by: sychen <sy...@ctrip.com>
    Co-authored-by: Cheng Pan <ch...@apache.org>
    Signed-off-by: Cheng Pan <ch...@apache.org>
---
 .github/workflows/master.yml                                 | 2 +-
 externals/kyuubi-flink-sql-engine/pom.xml                    | 2 +-
 externals/kyuubi-hive-sql-engine/pom.xml                     | 2 +-
 externals/kyuubi-jdbc-engine/pom.xml                         | 2 +-
 externals/kyuubi-spark-sql-engine/pom.xml                    | 2 +-
 externals/kyuubi-trino-engine/pom.xml                        | 2 +-
 integration-tests/kyuubi-flink-it/pom.xml                    | 2 +-
 integration-tests/kyuubi-hive-it/pom.xml                     | 2 +-
 integration-tests/kyuubi-jdbc-it/pom.xml                     | 2 +-
 integration-tests/kyuubi-kubernetes-it/pom.xml               | 2 +-
 integration-tests/kyuubi-trino-it/pom.xml                    | 2 +-
 integration-tests/kyuubi-zookeeper-it/pom.xml                | 2 +-
 kyuubi-common/src/main/scala/org/apache/kyuubi/package.scala | 3 ++-
 kyuubi-server/pom.xml                                        | 2 +-
 pom.xml                                                      | 9 +++++++++
 15 files changed, 24 insertions(+), 14 deletions(-)

diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml
index bcd7c52be..8b4123217 100644
--- a/.github/workflows/master.yml
+++ b/.github/workflows/master.yml
@@ -32,7 +32,7 @@ concurrency:
   cancel-in-progress: true
 
 env:
-  MVN_OPT: -Dmaven.javadoc.skip=true -Drat.skip=true -Dscalastyle.skip=true -Dspotless.check.skip -Dorg.slf4j.simpleLogger.defaultLogLevel=warn
+  MVN_OPT: -Dmaven.javadoc.skip=true -Drat.skip=true -Dscalastyle.skip=true -Dspotless.check.skip -Dorg.slf4j.simpleLogger.defaultLogLevel=warn -Pjdbc-shaded
 
 jobs:
   default:
diff --git a/externals/kyuubi-flink-sql-engine/pom.xml b/externals/kyuubi-flink-sql-engine/pom.xml
index 856cca22c..c93993607 100644
--- a/externals/kyuubi-flink-sql-engine/pom.xml
+++ b/externals/kyuubi-flink-sql-engine/pom.xml
@@ -122,7 +122,7 @@
 
         <dependency>
             <groupId>org.apache.kyuubi</groupId>
-            <artifactId>kyuubi-hive-jdbc-shaded</artifactId>
+            <artifactId>${hive.jdbc.artifact}</artifactId>
             <version>${project.version}</version>
             <scope>test</scope>
         </dependency>
diff --git a/externals/kyuubi-hive-sql-engine/pom.xml b/externals/kyuubi-hive-sql-engine/pom.xml
index 78d887c28..1dbc31947 100644
--- a/externals/kyuubi-hive-sql-engine/pom.xml
+++ b/externals/kyuubi-hive-sql-engine/pom.xml
@@ -153,7 +153,7 @@
 
         <dependency>
             <groupId>org.apache.kyuubi</groupId>
-            <artifactId>kyuubi-hive-jdbc-shaded</artifactId>
+            <artifactId>${hive.jdbc.artifact}</artifactId>
             <version>${project.version}</version>
             <scope>test</scope>
         </dependency>
diff --git a/externals/kyuubi-jdbc-engine/pom.xml b/externals/kyuubi-jdbc-engine/pom.xml
index 823372e4f..e00902d7a 100644
--- a/externals/kyuubi-jdbc-engine/pom.xml
+++ b/externals/kyuubi-jdbc-engine/pom.xml
@@ -60,7 +60,7 @@
 
         <dependency>
             <groupId>org.apache.kyuubi</groupId>
-            <artifactId>kyuubi-hive-jdbc-shaded</artifactId>
+            <artifactId>${hive.jdbc.artifact}</artifactId>
             <version>${project.version}</version>
             <scope>test</scope>
         </dependency>
diff --git a/externals/kyuubi-spark-sql-engine/pom.xml b/externals/kyuubi-spark-sql-engine/pom.xml
index 45b2b39be..93a548d3e 100644
--- a/externals/kyuubi-spark-sql-engine/pom.xml
+++ b/externals/kyuubi-spark-sql-engine/pom.xml
@@ -122,7 +122,7 @@
 
         <dependency>
             <groupId>org.apache.kyuubi</groupId>
-            <artifactId>kyuubi-hive-jdbc-shaded</artifactId>
+            <artifactId>${hive.jdbc.artifact}</artifactId>
             <version>${project.version}</version>
             <scope>test</scope>
         </dependency>
diff --git a/externals/kyuubi-trino-engine/pom.xml b/externals/kyuubi-trino-engine/pom.xml
index ccf84316e..7e2f67370 100644
--- a/externals/kyuubi-trino-engine/pom.xml
+++ b/externals/kyuubi-trino-engine/pom.xml
@@ -89,7 +89,7 @@
 
         <dependency>
             <groupId>org.apache.kyuubi</groupId>
-            <artifactId>kyuubi-hive-jdbc-shaded</artifactId>
+            <artifactId>${hive.jdbc.artifact}</artifactId>
             <version>${project.version}</version>
             <scope>test</scope>
         </dependency>
diff --git a/integration-tests/kyuubi-flink-it/pom.xml b/integration-tests/kyuubi-flink-it/pom.xml
index a934f7f38..7f9a84a85 100644
--- a/integration-tests/kyuubi-flink-it/pom.xml
+++ b/integration-tests/kyuubi-flink-it/pom.xml
@@ -55,7 +55,7 @@
 
         <dependency>
             <groupId>org.apache.kyuubi</groupId>
-            <artifactId>kyuubi-hive-jdbc-shaded</artifactId>
+            <artifactId>${hive.jdbc.artifact}</artifactId>
             <version>${project.version}</version>
             <scope>test</scope>
         </dependency>
diff --git a/integration-tests/kyuubi-hive-it/pom.xml b/integration-tests/kyuubi-hive-it/pom.xml
index 38b9e1c1d..8b9813a2b 100644
--- a/integration-tests/kyuubi-hive-it/pom.xml
+++ b/integration-tests/kyuubi-hive-it/pom.xml
@@ -55,7 +55,7 @@
 
         <dependency>
             <groupId>org.apache.kyuubi</groupId>
-            <artifactId>kyuubi-hive-jdbc-shaded</artifactId>
+            <artifactId>${hive.jdbc.artifact}</artifactId>
             <version>${project.version}</version>
             <scope>test</scope>
         </dependency>
diff --git a/integration-tests/kyuubi-jdbc-it/pom.xml b/integration-tests/kyuubi-jdbc-it/pom.xml
index 9c7d13925..526579e7c 100644
--- a/integration-tests/kyuubi-jdbc-it/pom.xml
+++ b/integration-tests/kyuubi-jdbc-it/pom.xml
@@ -68,7 +68,7 @@
 
         <dependency>
             <groupId>org.apache.kyuubi</groupId>
-            <artifactId>kyuubi-hive-jdbc-shaded</artifactId>
+            <artifactId>${hive.jdbc.artifact}</artifactId>
             <version>${project.version}</version>
             <scope>test</scope>
         </dependency>
diff --git a/integration-tests/kyuubi-kubernetes-it/pom.xml b/integration-tests/kyuubi-kubernetes-it/pom.xml
index 70dc11131..97357c726 100644
--- a/integration-tests/kyuubi-kubernetes-it/pom.xml
+++ b/integration-tests/kyuubi-kubernetes-it/pom.xml
@@ -89,7 +89,7 @@
         <!-- for hive driver related dependency -->
         <dependency>
             <groupId>org.apache.kyuubi</groupId>
-            <artifactId>kyuubi-hive-jdbc-shaded</artifactId>
+            <artifactId>${hive.jdbc.artifact}</artifactId>
             <version>${project.version}</version>
             <scope>test</scope>
         </dependency>
diff --git a/integration-tests/kyuubi-trino-it/pom.xml b/integration-tests/kyuubi-trino-it/pom.xml
index 83905fe9d..e62e58d1d 100644
--- a/integration-tests/kyuubi-trino-it/pom.xml
+++ b/integration-tests/kyuubi-trino-it/pom.xml
@@ -55,7 +55,7 @@
 
         <dependency>
             <groupId>org.apache.kyuubi</groupId>
-            <artifactId>kyuubi-hive-jdbc-shaded</artifactId>
+            <artifactId>${hive.jdbc.artifact}</artifactId>
             <version>${project.version}</version>
             <scope>test</scope>
         </dependency>
diff --git a/integration-tests/kyuubi-zookeeper-it/pom.xml b/integration-tests/kyuubi-zookeeper-it/pom.xml
index a6436fc88..eaeff5898 100644
--- a/integration-tests/kyuubi-zookeeper-it/pom.xml
+++ b/integration-tests/kyuubi-zookeeper-it/pom.xml
@@ -60,7 +60,7 @@
 
         <dependency>
             <groupId>org.apache.kyuubi</groupId>
-            <artifactId>kyuubi-hive-jdbc-shaded</artifactId>
+            <artifactId>${hive.jdbc.artifact}</artifactId>
             <version>${project.version}</version>
             <scope>test</scope>
         </dependency>
diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/package.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/package.scala
index 1adc7c8cd..11871c5d0 100644
--- a/kyuubi-common/src/main/scala/org/apache/kyuubi/package.scala
+++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/package.scala
@@ -30,7 +30,8 @@ package object kyuubi {
     if (buildFileStream == null) {
       throw new KyuubiException(s"Can not load the core build file: $buildFile, if you meet " +
         s"this exception when running unit tests " +
-        s"please make sure you have run the `mvn package` or `mvn generate-resources` command.")
+        s"please make sure you have run the `mvn package` or " +
+        s"`mvn antrun:run@build-info -pl kyuubi-common` command.")
     }
 
     private val unknown = "<unknown>"
diff --git a/kyuubi-server/pom.xml b/kyuubi-server/pom.xml
index e91b204a4..abae09750 100644
--- a/kyuubi-server/pom.xml
+++ b/kyuubi-server/pom.xml
@@ -266,7 +266,7 @@
 
         <dependency>
             <groupId>org.apache.kyuubi</groupId>
-            <artifactId>kyuubi-hive-jdbc-shaded</artifactId>
+            <artifactId>${hive.jdbc.artifact}</artifactId>
             <version>${project.version}</version>
             <scope>test</scope>
         </dependency>
diff --git a/pom.xml b/pom.xml
index 486f6ac81..39ab9b7be 100644
--- a/pom.xml
+++ b/pom.xml
@@ -203,6 +203,8 @@
         <hive.client.jline.version>2.12</hive.client.jline.version>
         <hive.client.supercsv.version>2.2.0</hive.client.supercsv.version>
 
+        <hive.jdbc.artifact>kyuubi-hive-jdbc</hive.jdbc.artifact>
+
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <jars.target.dir>${project.build.directory}/scala-${scala.binary.version}/jars</jars.target.dir>
 
@@ -2348,6 +2350,13 @@
             </properties>
         </profile>
 
+        <profile>
+            <id>jdbc-shaded</id>
+            <properties>
+                <hive.jdbc.artifact>kyuubi-hive-jdbc-shaded</hive.jdbc.artifact>
+            </properties>
+        </profile>
+
         <profile>
             <id>fast</id>
             <properties>