You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by "pan3793 (via GitHub)" <gi...@apache.org> on 2023/09/14 02:26:21 UTC

[GitHub] [kyuubi] pan3793 opened a new pull request, #5280: [WIP] Hive engine compatible with Hive 2.3

pan3793 opened a new pull request, #5280:
URL: https://github.com/apache/kyuubi/pull/5280

   <!--
   Thanks for sending a pull request!
   
   Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/CONTRIBUTING.html
     2. If the PR is related to an issue in https://github.com/apache/kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'.
   -->
   
   ### _Why are the changes needed?_
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you add a feature, you can talk about the use case of it.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   Try to make Hive engine compatible with Hive 2.3
   
   ### _How was this patch tested?_
   - [x] 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/contributing/code/testing.html#running-tests) locally before make a pull request
   
   
   ### _Was this patch authored or co-authored using generative AI tooling?_
   <!--
   If a generative AI tooling has been used in the process of authoring this patch, please include
   phrase 'Generated-by: ' followed by the name of the tool and its version.
   If no, write 'No'.
   Please refer to the [ASF Generative Tooling Guidance](https://www.apache.org/legal/generative-tooling.html) for details.
   -->
   No


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


Re: [PR] Hive engine compatible with Hive 2.3 [kyuubi]

Posted by "Yikf (via GitHub)" <gi...@apache.org>.
Yikf commented on code in PR #5280:
URL: https://github.com/apache/kyuubi/pull/5280#discussion_r1403899037


##########
.github/workflows/master.yml:
##########
@@ -261,8 +266,15 @@ jobs:
       - name: Build and test Hive with maven w/o linters
         run: |
           TEST_MODULES="externals/kyuubi-hive-sql-engine,integration-tests/kyuubi-hive-it"
-          ./build/mvn ${MVN_OPT} -pl ${TEST_MODULES} -am clean install -DskipTests
-          ./build/mvn ${MVN_OPT} -pl ${TEST_MODULES} test
+          ./build/mvn ${MVN_OPT} ${{ matrix.hive-archive }} -pl ${TEST_MODULES} -am clean install -DskipTests
+          # Hive 2.3.9 ships Derby 10.10.2.0, which may fail to boostrap on latest JDK 8
+          # https://github.com/apache/hive/pull/4895
+          if [[ "${{ matrix.hive-archive }}" == *apache-hive-2.3.9-bin.tar.gz* ]]; then
+            HIVE_239_LIB="$PWD/externals/kyuubi-download/target/apache-hive-2.3.9-bin/lib"

Review Comment:
   > This only affects users who use derby as the embedded metastore storage backend, not a production solution
   
   Get



-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


Re: [PR] Hive engine compatible with Hive 2.3 [kyuubi]

Posted by "Yikf (via GitHub)" <gi...@apache.org>.
Yikf commented on code in PR #5280:
URL: https://github.com/apache/kyuubi/pull/5280#discussion_r1403843926


##########
.github/workflows/master.yml:
##########
@@ -261,8 +266,15 @@ jobs:
       - name: Build and test Hive with maven w/o linters
         run: |
           TEST_MODULES="externals/kyuubi-hive-sql-engine,integration-tests/kyuubi-hive-it"
-          ./build/mvn ${MVN_OPT} -pl ${TEST_MODULES} -am clean install -DskipTests
-          ./build/mvn ${MVN_OPT} -pl ${TEST_MODULES} test
+          ./build/mvn ${MVN_OPT} ${{ matrix.hive-archive }} -pl ${TEST_MODULES} -am clean install -DskipTests
+          # Hive 2.3.9 ships Derby 10.10.2.0, which may fail to boostrap on latest JDK 8
+          # https://github.com/apache/hive/pull/4895
+          if [[ "${{ matrix.hive-archive }}" == *apache-hive-2.3.9-bin.tar.gz* ]]; then
+            HIVE_239_LIB="$PWD/externals/kyuubi-download/target/apache-hive-2.3.9-bin/lib"

Review Comment:
   Nice job! I suggest that to record this information in the official document.



-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


Re: [PR] Hive engine compatible with Hive 2.3 [kyuubi]

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #5280:
URL: https://github.com/apache/kyuubi/pull/5280#issuecomment-1825221484

   Thanks, merged to master/1.8


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


Re: [PR] [WIP] Hive engine compatible with Hive 2.3 [kyuubi]

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #5280:
URL: https://github.com/apache/kyuubi/pull/5280#discussion_r1402946980


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/engine/hive/HiveProcessBuilder.scala:
##########
@@ -116,8 +116,6 @@ class HiveProcessBuilder(
     buffer.toArray
   }
 
-  override def toString: String = Utils.redactCommandLineArgs(conf, commands).mkString("\n")

Review Comment:
   the output is ugly, prefer to use the parent implementation



-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


Re: [PR] Hive engine compatible with Hive 2.3 [kyuubi]

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #5280:
URL: https://github.com/apache/kyuubi/pull/5280#discussion_r1403848146


##########
.github/workflows/master.yml:
##########
@@ -261,8 +266,15 @@ jobs:
       - name: Build and test Hive with maven w/o linters
         run: |
           TEST_MODULES="externals/kyuubi-hive-sql-engine,integration-tests/kyuubi-hive-it"
-          ./build/mvn ${MVN_OPT} -pl ${TEST_MODULES} -am clean install -DskipTests
-          ./build/mvn ${MVN_OPT} -pl ${TEST_MODULES} test
+          ./build/mvn ${MVN_OPT} ${{ matrix.hive-archive }} -pl ${TEST_MODULES} -am clean install -DskipTests
+          # Hive 2.3.9 ships Derby 10.10.2.0, which may fail to boostrap on latest JDK 8
+          # https://github.com/apache/hive/pull/4895
+          if [[ "${{ matrix.hive-archive }}" == *apache-hive-2.3.9-bin.tar.gz* ]]; then
+            HIVE_239_LIB="$PWD/externals/kyuubi-download/target/apache-hive-2.3.9-bin/lib"

Review Comment:
   This only affects users who use derby as the embedded metastore storage backend, not a production solution



-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


Re: [PR] [WIP] Hive engine compatible with Hive 2.3 [kyuubi]

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #5280:
URL: https://github.com/apache/kyuubi/pull/5280#issuecomment-1824561255

   Hive 2.3.9 ships `derby-10.10.2.0.jar`, it has issues to bootstrap on the latest Java 8
   
   ```
   Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.apache.derby.impl.services.monitor.FileMonitor
           at org.apache.derby.iapi.services.monitor.Monitor.startMonitor(Unknown Source) ~[derby-10.10.2.0.jar:?]
           at org.apache.derby.iapi.jdbc.JDBCBoot.boot(Unknown Source) ~[derby-10.10.2.0.jar:?]
           at org.apache.derby.jdbc.EmbeddedDriver.boot(Unknown Source) ~[derby-10.10.2.0.jar:?]
           at org.apache.derby.jdbc.EmbeddedDriver.<clinit>(Unknown Source) ~[derby-10.10.2.0.jar:?]
           at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_382]
           at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_382]
           at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_382]
           at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_382]
           at java.lang.Class.newInstance(Class.java:442) ~[?:1.8.0_382]
           at org.datanucleus.store.rdbms.connectionpool.AbstractConnectionPoolFactory.loadDriver(AbstractConnectionPoolFactory.java:47) ~[datanucleus-rdbms-4.1.19.jar:?]
           at org.datanucleus.store.rdbms.connectionpool.BoneCPConnectionPoolFactory.createConnectionPool(BoneCPConnectionPoolFactory.java:54) ~[datanucleus-rdbms-4.1.19.jar:?]
           ...
   ```
   
   potential solutions:
   - Use testcontianers to launch a PostgreSQL for Hive integration tests
   - replace Derby jars with 10.14.x


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


Re: [PR] Hive engine compatible with Hive 2.3 [kyuubi]

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 closed pull request #5280: Hive engine compatible with Hive 2.3
URL: https://github.com/apache/kyuubi/pull/5280


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


Re: [PR] [WIP] Hive engine compatible with Hive 2.3 [kyuubi]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #5280:
URL: https://github.com/apache/kyuubi/pull/5280#issuecomment-1824763446

   ## [Codecov](https://app.codecov.io/gh/apache/kyuubi/pull/5280?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   Attention: `10 lines` in your changes are missing coverage. Please review.
   > Comparison is base [(`9306e57`)](https://app.codecov.io/gh/apache/kyuubi/commit/9306e5762683b59d9f02379853a53aabca46415d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 61.35% compared to head [(`9ce7667`)](https://app.codecov.io/gh/apache/kyuubi/pull/5280?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 61.34%.
   > Report is 8 commits behind head on master.
   
   | [Files](https://app.codecov.io/gh/apache/kyuubi/pull/5280?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...apache/kyuubi/engine/chat/ChatProcessBuilder.scala](https://app.codecov.io/gh/apache/kyuubi/pull/5280?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9lbmdpbmUvY2hhdC9DaGF0UHJvY2Vzc0J1aWxkZXIuc2NhbGE=) | 0.00% | [4 Missing :warning: ](https://app.codecov.io/gh/apache/kyuubi/pull/5280?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [.../main/scala/org/apache/kyuubi/util/JdbcUtils.scala](https://app.codecov.io/gh/apache/kyuubi/pull/5280?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS91dGlsL0pkYmNVdGlscy5zY2FsYQ==) | 0.00% | [3 Missing :warning: ](https://app.codecov.io/gh/apache/kyuubi/pull/5280?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...n/scala/org/apache/kyuubi/engine/ProcBuilder.scala](https://app.codecov.io/gh/apache/kyuubi/pull/5280?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9lbmdpbmUvUHJvY0J1aWxkZXIuc2NhbGE=) | 50.00% | [1 Missing :warning: ](https://app.codecov.io/gh/apache/kyuubi/pull/5280?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...apache/kyuubi/engine/jdbc/JdbcProcessBuilder.scala](https://app.codecov.io/gh/apache/kyuubi/pull/5280?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9lbmdpbmUvamRiYy9KZGJjUHJvY2Vzc0J1aWxkZXIuc2NhbGE=) | 80.00% | [1 Missing :warning: ](https://app.codecov.io/gh/apache/kyuubi/pull/5280?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...ache/kyuubi/engine/trino/TrinoProcessBuilder.scala](https://app.codecov.io/gh/apache/kyuubi/pull/5280?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9lbmdpbmUvdHJpbm8vVHJpbm9Qcm9jZXNzQnVpbGRlci5zY2FsYQ==) | 80.00% | [1 Missing :warning: ](https://app.codecov.io/gh/apache/kyuubi/pull/5280?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #5280      +/-   ##
   ============================================
   - Coverage     61.35%   61.34%   -0.01%     
     Complexity       23       23              
   ============================================
     Files           607      607              
     Lines         35897    35908      +11     
     Branches       4923     4926       +3     
   ============================================
   + Hits          22023    22028       +5     
   - Misses        11482    11493      +11     
   + Partials       2392     2387       -5     
   ```
   
   
   
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/kyuubi/pull/5280?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   


-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


Re: [PR] Hive engine compatible with Hive 2.3 [kyuubi]

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #5280:
URL: https://github.com/apache/kyuubi/pull/5280#discussion_r1403848957


##########
.github/workflows/master.yml:
##########
@@ -261,8 +266,15 @@ jobs:
       - name: Build and test Hive with maven w/o linters
         run: |
           TEST_MODULES="externals/kyuubi-hive-sql-engine,integration-tests/kyuubi-hive-it"
-          ./build/mvn ${MVN_OPT} -pl ${TEST_MODULES} -am clean install -DskipTests
-          ./build/mvn ${MVN_OPT} -pl ${TEST_MODULES} test
+          ./build/mvn ${MVN_OPT} ${{ matrix.hive-archive }} -pl ${TEST_MODULES} -am clean install -DskipTests
+          # Hive 2.3.9 ships Derby 10.10.2.0, which may fail to boostrap on latest JDK 8
+          # https://github.com/apache/hive/pull/4895
+          if [[ "${{ matrix.hive-archive }}" == *apache-hive-2.3.9-bin.tar.gz* ]]; then
+            HIVE_239_LIB="$PWD/externals/kyuubi-download/target/apache-hive-2.3.9-bin/lib"

Review Comment:
   but it worth to write a dedicated docs page for hive engines deployment



-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org