You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by GitBox <gi...@apache.org> on 2022/05/11 09:32:25 UTC

[GitHub] [incubator-kyuubi] jiaoqingbo opened a new pull request, #2630: [KYUUBI #2616]Remove embedded mode support in Kyuubi Hive JDBC driver

jiaoqingbo opened a new pull request, #2630:
URL: https://github.com/apache/incubator-kyuubi/pull/2630

   <!--
   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/contributions.html
     2. If the PR is related to an issue in https://github.com/apache/incubator-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.
   -->
   fix #2616 
   
   ### _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.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request
   


-- 
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


[GitHub] [incubator-kyuubi] pan3793 commented on a diff in pull request #2630: [KYUUBI #2616]Remove embedded mode support in Kyuubi Hive JDBC driver

Posted by GitBox <gi...@apache.org>.
pan3793 commented on code in PR #2630:
URL: https://github.com/apache/incubator-kyuubi/pull/2630#discussion_r870281818


##########
kyuubi-hive-jdbc/src/test/java/org/apache/kyuubi/jdbc/hive/UtilsTest.java:
##########
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+
+package org.apache.kyuubi.jdbc.hive;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Properties;
+import org.junit.Test;
+
+public class UtilsTest {
+
+  @Test
+  public void testExtractURLComponentsWithAuthoritiesIsEmpty() throws JdbcUriParseException {
+    String uri1 = "jdbc:hive2:///db;k1=v1?k2=v2#k3=v3";
+    String uri2 = "jdbc:hive2:///";

Review Comment:
   Add test for `jdbc:kyuubi://` and `jdbc:hive2://`



-- 
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


[GitHub] [incubator-kyuubi] jiaoqingbo commented on a diff in pull request #2630: [KYUUBI #2616]Remove embedded mode support in Kyuubi Hive JDBC driver

Posted by GitBox <gi...@apache.org>.
jiaoqingbo commented on code in PR #2630:
URL: https://github.com/apache/incubator-kyuubi/pull/2630#discussion_r870299818


##########
kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/Utils.java:
##########
@@ -369,11 +347,13 @@ public static JdbcConnectionParams extractURLComponents(String uri, Properties i
     if ((authorityFromClientJdbcURL == null) || (authorityFromClientJdbcURL.isEmpty())) {
       // Given uri of the form:
       // jdbc:hive2:///dbName;sess_var_list?hive_conf_list#hive_var_list
-      connParams.setEmbeddedMode(true);
-    } else {
-      connParams.setSuppliedURLAuthority(authorityFromClientJdbcURL);
-      uri = uri.replace(authorityFromClientJdbcURL, dummyAuthorityString);
+      authorityFromClientJdbcURL = "localhost:10009";
+      uri =
+          uri.replace(

Review Comment:
   ok I will make line351 and line 352 to one line



-- 
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


[GitHub] [incubator-kyuubi] pan3793 closed pull request #2630: [KYUUBI #2616] Remove embedded mode support in Kyuubi Hive JDBC driver

Posted by GitBox <gi...@apache.org>.
pan3793 closed pull request #2630: [KYUUBI #2616] Remove embedded mode support in Kyuubi Hive JDBC driver
URL: https://github.com/apache/incubator-kyuubi/pull/2630


-- 
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


[GitHub] [incubator-kyuubi] pan3793 commented on a diff in pull request #2630: [KYUUBI #2616]Remove embedded mode support in Kyuubi Hive JDBC driver

Posted by GitBox <gi...@apache.org>.
pan3793 commented on code in PR #2630:
URL: https://github.com/apache/incubator-kyuubi/pull/2630#discussion_r870282151


##########
kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/Utils.java:
##########
@@ -369,11 +347,13 @@ public static JdbcConnectionParams extractURLComponents(String uri, Properties i
     if ((authorityFromClientJdbcURL == null) || (authorityFromClientJdbcURL.isEmpty())) {
       // Given uri of the form:
       // jdbc:hive2:///dbName;sess_var_list?hive_conf_list#hive_var_list
-      connParams.setEmbeddedMode(true);
-    } else {
-      connParams.setSuppliedURLAuthority(authorityFromClientJdbcURL);
-      uri = uri.replace(authorityFromClientJdbcURL, dummyAuthorityString);
+      authorityFromClientJdbcURL = "localhost:10009";
+      uri =
+          uri.replace(

Review Comment:
   nit: merge to line 351?



-- 
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


[GitHub] [incubator-kyuubi] pan3793 commented on pull request #2630: [KYUUBI #2616] Remove embedded mode support in Kyuubi Hive JDBC driver

Posted by GitBox <gi...@apache.org>.
pan3793 commented on PR #2630:
URL: https://github.com/apache/incubator-kyuubi/pull/2630#issuecomment-1124502643

   Thanks, merging to master


-- 
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


[GitHub] [incubator-kyuubi] jiaoqingbo commented on pull request #2630: [KYUUBI #2616]Remove embedded mode support in Kyuubi Hive JDBC driver

Posted by GitBox <gi...@apache.org>.
jiaoqingbo commented on PR #2630:
URL: https://github.com/apache/incubator-kyuubi/pull/2630#issuecomment-1123698519

   cc @pan3793 


-- 
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


[GitHub] [incubator-kyuubi] codecov-commenter commented on pull request #2630: [KYUUBI #2616] Remove embedded mode support in Kyuubi Hive JDBC driver

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #2630:
URL: https://github.com/apache/incubator-kyuubi/pull/2630#issuecomment-1124443092

   # [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/2630?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#2630](https://codecov.io/gh/apache/incubator-kyuubi/pull/2630?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (113161f) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/981b41619bae4a566874eb063e50e89dd520ad04?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (981b416) will **increase** coverage by `0.41%`.
   > The diff coverage is `26.78%`.
   
   > :exclamation: Current head 113161f differs from pull request most recent head 49bdb0f. Consider uploading reports for the commit 49bdb0f to get more accurate results
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #2630      +/-   ##
   ============================================
   + Coverage     63.70%   64.12%   +0.41%     
     Complexity       80       80              
   ============================================
     Files           383      384       +1     
     Lines         18603    18558      -45     
     Branches       2514     2512       -2     
   ============================================
   + Hits          11851    11900      +49     
   + Misses         5634     5513     -121     
   - Partials       1118     1145      +27     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/2630?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [.../org/apache/kyuubi/jdbc/hive/KyuubiConnection.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/2630/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWhpdmUtamRiYy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUva3l1dWJpL2pkYmMvaGl2ZS9LeXV1YmlDb25uZWN0aW9uLmphdmE=) | `4.13% <0.00%> (+0.07%)` | :arrow_up: |
   | [...c/main/java/org/apache/kyuubi/jdbc/hive/Utils.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/2630/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWhpdmUtamRiYy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUva3l1dWJpL2pkYmMvaGl2ZS9VdGlscy5qYXZh) | `31.57% <62.50%> (+29.23%)` | :arrow_up: |
   | [...park/authz/ranger/FilterDataSourceV2Strategy.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2630/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZW5zaW9ucy9zcGFyay9reXV1Ymktc3BhcmstYXV0aHovc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvcGx1Z2luL3NwYXJrL2F1dGh6L3Jhbmdlci9GaWx0ZXJEYXRhU291cmNlVjJTdHJhdGVneS5zY2FsYQ==) | `80.00% <0.00%> (-15.46%)` | :arrow_down: |
   | [...rg/apache/kyuubi/engine/trino/TrinoSqlEngine.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2630/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL1RyaW5vU3FsRW5naW5lLnNjYWxh) | `52.63% <0.00%> (-7.02%)` | :arrow_down: |
   | [...ache/kyuubi/engine/spark/SparkProcessBuilder.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2630/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9lbmdpbmUvc3BhcmsvU3BhcmtQcm9jZXNzQnVpbGRlci5zY2FsYQ==) | `83.60% <0.00%> (-1.64%)` | :arrow_down: |
   | [...ain/scala/org/apache/kyuubi/engine/EngineRef.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2630/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9lbmdpbmUvRW5naW5lUmVmLnNjYWxh) | `77.35% <0.00%> (-0.95%)` | :arrow_down: |
   | [...in/scala/org/apache/kyuubi/config/KyuubiConf.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2630/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9jb25maWcvS3l1dWJpQ29uZi5zY2FsYQ==) | `96.60% <0.00%> (-0.12%)` | :arrow_down: |
   | [...k/authz/ranger/RuleReplaceShowObjectCommands.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2630/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZW5zaW9ucy9zcGFyay9reXV1Ymktc3BhcmstYXV0aHovc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvcGx1Z2luL3NwYXJrL2F1dGh6L3Jhbmdlci9SdWxlUmVwbGFjZVNob3dPYmplY3RDb21tYW5kcy5zY2FsYQ==) | `50.00% <0.00%> (ø)` | |
   | [...lugin/spark/authz/ranger/KyuubiV2CommandExec.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2630/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZW5zaW9ucy9zcGFyay9reXV1Ymktc3BhcmstYXV0aHovc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvcGx1Z2luL3NwYXJrL2F1dGh6L3Jhbmdlci9LeXV1YmlWMkNvbW1hbmRFeGVjLnNjYWxh) | | |
   | [...gin/spark/authz/util/ObjectFilterPlaceHolder.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2630/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZW5zaW9ucy9zcGFyay9reXV1Ymktc3BhcmstYXV0aHovc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvcGx1Z2luL3NwYXJrL2F1dGh6L3V0aWwvT2JqZWN0RmlsdGVyUGxhY2VIb2xkZXIuc2NhbGE=) | `50.00% <0.00%> (ø)` | |
   | ... and [5 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/2630/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/2630?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/2630?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [981b416...49bdb0f](https://codecov.io/gh/apache/incubator-kyuubi/pull/2630?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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


[GitHub] [incubator-kyuubi] jiaoqingbo commented on a diff in pull request #2630: [KYUUBI #2616]Remove embedded mode support in Kyuubi Hive JDBC driver

Posted by GitBox <gi...@apache.org>.
jiaoqingbo commented on code in PR #2630:
URL: https://github.com/apache/incubator-kyuubi/pull/2630#discussion_r870286390


##########
kyuubi-hive-jdbc/src/test/java/org/apache/kyuubi/jdbc/hive/UtilsTest.java:
##########
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+
+package org.apache.kyuubi.jdbc.hive;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Properties;
+import org.junit.Test;
+
+public class UtilsTest {
+
+  @Test
+  public void testExtractURLComponentsWithAuthoritiesIsEmpty() throws JdbcUriParseException {
+    String uri1 = "jdbc:hive2:///db;k1=v1?k2=v2#k3=v3";
+    String uri2 = "jdbc:hive2:///";

Review Comment:
   ok



-- 
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