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/08/26 05:30:53 UTC

[GitHub] [incubator-kyuubi] turboFei opened a new pull request, #3354: Support to get engine id, name, url in KyuubiConnection

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

   <!--
   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/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.
   -->
   
   
   ### _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] turboFei commented on a diff in pull request #3354: Support to get engine id, name, url in KyuubiConnection

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


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/client/KyuubiSyncThriftClient.scala:
##########
@@ -164,8 +169,14 @@ class KyuubiSyncThriftClient private (
     ThriftUtils.verifyTStatus(resp.getStatus)
     _remoteSessionHandle = resp.getSessionHandle
     _engineId = Option(resp.getConfiguration)
-      .filter(_.containsKey("kyuubi.engine.id"))
-      .map(_.get("kyuubi.engine.id"))
+      .filter(_.containsKey(KYUUBI_ENGINE_ID))
+      .map(_.get(KYUUBI_ENGINE_ID))
+    _engineName = Option(resp.getConfiguration)
+      .filter(_.containsKey(KYUUBI_ENGINE_NAME))
+      .map(_.get(KYUUBI_ENGINE_NAME))
+    _engineUrl = Option(resp.getConfiguration)
+      .filter(_.containsKey(KYUUBI_ENGINE_URL))
+      .map(_.get(KYUUBI_ENGINE_URL))

Review Comment:
   ```
   
   scala> Option(Collections.singletonMap("key", "v")).map(_.get("k"))
   res2: Option[String] = Some(null)
   
   scala> Option(Collections.singletonMap("key", "v")).filter(_.containsKey("k")).map(_.get("k"))
   res3: Option[String] = None
   
   scala>
   ```
   Not absolute same.



-- 
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] [kyuubi] pan3793 commented on pull request #3354: Support to get engine id, name, url in KyuubiConnection

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

   > I found that, if the user use the high version kyuubi jdbc including this pr to access low version kyuubi server.
   > 
   > It will throw `out of sequence` thrift exception.
   
   it's critical, we need to fix it


-- 
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] cxzl25 commented on a diff in pull request #3354: Support to get engine id, name, url in KyuubiConnection

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


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/client/KyuubiSyncThriftClient.scala:
##########
@@ -164,8 +169,14 @@ class KyuubiSyncThriftClient private (
     ThriftUtils.verifyTStatus(resp.getStatus)
     _remoteSessionHandle = resp.getSessionHandle
     _engineId = Option(resp.getConfiguration)
-      .filter(_.containsKey("kyuubi.engine.id"))
-      .map(_.get("kyuubi.engine.id"))
+      .filter(_.containsKey(KYUUBI_ENGINE_ID))
+      .map(_.get(KYUUBI_ENGINE_ID))
+    _engineName = Option(resp.getConfiguration)
+      .filter(_.containsKey(KYUUBI_ENGINE_NAME))
+      .map(_.get(KYUUBI_ENGINE_NAME))
+    _engineUrl = Option(resp.getConfiguration)
+      .filter(_.containsKey(KYUUBI_ENGINE_URL))
+      .map(_.get(KYUUBI_ENGINE_URL))

Review Comment:
   Here filter and map seem a bit redundant, get should be enough.



-- 
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] turboFei commented on pull request #3354: Support to get engine id, name, url in KyuubiConnection

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

   I found that, if the user use the high version kyuubi jdbc including this pr to access low version kyuubi server.
   
   It will throw `out of sequence` thrift exception.


-- 
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] turboFei commented on pull request #3354: Support to get engine id, name, url in KyuubiConnection

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

   thanks @wForget @cxzl25 for the review, 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] turboFei closed pull request #3354: Support to get engine id, name, url in KyuubiConnection

Posted by GitBox <gi...@apache.org>.
turboFei closed pull request #3354: Support to get engine id, name, url in KyuubiConnection
URL: https://github.com/apache/incubator-kyuubi/pull/3354


-- 
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 #3354: Support to get engine id, name, url in KyuubiConnection

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

   # [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/3354?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 [#3354](https://codecov.io/gh/apache/incubator-kyuubi/pull/3354?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (984b5d3) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/f88c4cbbd5bd968dd1456637bf1d82cbb9234a04?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f88c4cb) will **decrease** coverage by `0.14%`.
   > The diff coverage is `49.36%`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #3354      +/-   ##
   ============================================
   - Coverage     51.58%   51.43%   -0.15%     
     Complexity       13       13              
   ============================================
     Files           475      476       +1     
     Lines         26475    26539      +64     
     Branches       3694     3702       +8     
   ============================================
   - Hits          13656    13650       -6     
   - Misses        11496    11561      +65     
   - Partials       1323     1328       +5     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/3354?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/config/KyuubiReservedKeys.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/3354/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-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9jb25maWcvS3l1dWJpUmVzZXJ2ZWRLZXlzLnNjYWxh) | `0.00% <ø> (ø)` | |
   | [.../org/apache/kyuubi/jdbc/hive/KyuubiConnection.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/3354/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=) | `3.97% <0.00%> (-0.20%)` | :arrow_down: |
   | [.../kyuubi/operation/KyuubiApplicationOperation.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/3354/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-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vS3l1dWJpQXBwbGljYXRpb25PcGVyYXRpb24uc2NhbGE=) | `47.36% <47.36%> (ø)` | |
   | [...g/apache/kyuubi/engine/spark/KyuubiSparkUtil.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/3354/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-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9LeXV1YmlTcGFya1V0aWwuc2NhbGE=) | `92.10% <100.00%> (+0.92%)` | :arrow_up: |
   | [...ubi/engine/spark/SparkTBinaryFrontendService.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/3354/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-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9TcGFya1RCaW5hcnlGcm9udGVuZFNlcnZpY2Uuc2NhbGE=) | `82.92% <100.00%> (+0.64%)` | :arrow_up: |
   | [.../apache/kyuubi/client/KyuubiSyncThriftClient.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/3354/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-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9jbGllbnQvS3l1dWJpU3luY1RocmlmdENsaWVudC5zY2FsYQ==) | `84.73% <100.00%> (+0.63%)` | :arrow_up: |
   | [...g/apache/kyuubi/operation/BatchJobSubmission.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/3354/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-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vQmF0Y2hKb2JTdWJtaXNzaW9uLnNjYWxh) | `72.00% <100.00%> (-2.41%)` | :arrow_down: |
   | [...ala/org/apache/kyuubi/operation/LaunchEngine.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/3354/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-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vTGF1bmNoRW5naW5lLnNjYWxh) | `89.28% <100.00%> (+2.92%)` | :arrow_up: |
   | [...org/apache/spark/kyuubi/SQLOperationListener.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/3354/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-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvc3Bhcmsva3l1dWJpL1NRTE9wZXJhdGlvbkxpc3RlbmVyLnNjYWxh) | `73.17% <0.00%> (-7.08%)` | :arrow_down: |
   | [.../kyuubi/server/mysql/constant/MySQLErrorCode.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/3354/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-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvY29uc3RhbnQvTXlTUUxFcnJvckNvZGUuc2NhbGE=) | `13.84% <0.00%> (-6.16%)` | :arrow_down: |
   | ... and [16 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/3354/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) | |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?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] turboFei commented on pull request #3354: Support to get engine id, name, url in KyuubiConnection

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

   cc @yaooqinn @wForget 


-- 
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] turboFei commented on a diff in pull request #3354: Support to get engine id, name, url in KyuubiConnection

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


##########
externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/KyuubiSparkUtil.scala:
##########
@@ -62,9 +66,9 @@ object KyuubiSparkUtil extends Logging {
     // scalastyle:off line.size.limit
     // format: off
     s"""
-       |           Spark application name: ${sc.appName}
+       |           Spark application name: $engineName
        |                 application ID: $engineId
-       |                 application web UI: $webUrl

Review Comment:
   resolved, thanks



-- 
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] wForget commented on a diff in pull request #3354: Support to get engine id, name, url in KyuubiConnection

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


##########
externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/KyuubiSparkUtil.scala:
##########
@@ -62,9 +66,9 @@ object KyuubiSparkUtil extends Logging {
     // scalastyle:off line.size.limit
     // format: off
     s"""
-       |           Spark application name: ${sc.appName}
+       |           Spark application name: $engineName
        |                 application ID: $engineId
-       |                 application web UI: $webUrl

Review Comment:
   The webUrl(L63) is not used and needs to be removed.



-- 
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] cxzl25 commented on a diff in pull request #3354: Support to get engine id, name, url in KyuubiConnection

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


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/client/KyuubiSyncThriftClient.scala:
##########
@@ -164,8 +169,14 @@ class KyuubiSyncThriftClient private (
     ThriftUtils.verifyTStatus(resp.getStatus)
     _remoteSessionHandle = resp.getSessionHandle
     _engineId = Option(resp.getConfiguration)
-      .filter(_.containsKey("kyuubi.engine.id"))
-      .map(_.get("kyuubi.engine.id"))
+      .filter(_.containsKey(KYUUBI_ENGINE_ID))
+      .map(_.get(KYUUBI_ENGINE_ID))
+    _engineName = Option(resp.getConfiguration)
+      .filter(_.containsKey(KYUUBI_ENGINE_NAME))
+      .map(_.get(KYUUBI_ENGINE_NAME))
+    _engineUrl = Option(resp.getConfiguration)
+      .filter(_.containsKey(KYUUBI_ENGINE_URL))
+      .map(_.get(KYUUBI_ENGINE_URL))

Review Comment:
   Sorry, I thought it was scala map.
   
   ```scala
   scala> Option(Map("key"->"v")).map(_.get("k")).flatten
   res0: Option[String] = None
   ```



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