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/04/12 09:04:36 UTC

[GitHub] [incubator-kyuubi] wForget opened a new pull request, #2332: [KYUUBI #2331] Add createSession method to further abstract openSession

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

   <!--
   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.
   -->
   
   close #2331
   
   ### _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] ulysses-you commented on a diff in pull request #2332: [KYUUBI #2331] Add createSession method to further abstract openSession

Posted by GitBox <gi...@apache.org>.
ulysses-you commented on code in PR #2332:
URL: https://github.com/apache/incubator-kyuubi/pull/2332#discussion_r849009460


##########
externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/session/SparkSQLSessionManager.scala:
##########
@@ -51,12 +51,12 @@ class SparkSQLSessionManager private (name: String, spark: SparkSession)
 
   private lazy val singleSparkSession = conf.get(ENGINE_SINGLE_SPARK_SESSION)
 
-  override def openSession(
+  override def createSession(
       protocol: TProtocolVersion,
       user: String,
       password: String,
       ipAddress: String,
-      conf: Map[String, String]): SessionHandle = {
+      conf: Map[String, String]): Session = {
     val clientIp = conf.getOrElse(CLIENT_IP_KEY, ipAddress)
     info(s"Opening session for $user@$clientIp")

Review Comment:
   shall we move this to `openSession` ?



-- 
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] ulysses-you closed pull request #2332: [KYUUBI #2331] Add createSession method to further abstract openSession

Posted by GitBox <gi...@apache.org>.
ulysses-you closed pull request #2332: [KYUUBI #2331] Add createSession method to further abstract openSession
URL: https://github.com/apache/incubator-kyuubi/pull/2332


-- 
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 pull request #2332: [KYUUBI #2331] Add createSession method to further abstract openSession

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

   @yaooqinn @ulysses-you @pan3793 could you help me review this?


-- 
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 #2332: [KYUUBI #2331] Add createSession method to further abstract openSession

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

   # [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/2332?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 [#2332](https://codecov.io/gh/apache/incubator-kyuubi/pull/2332?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b74efd8) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/c29d2d85ae4b6ed6878702b38eb5795471ad2231?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c29d2d8) will **increase** coverage by `0.02%`.
   > The diff coverage is `94.44%`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #2332      +/-   ##
   ============================================
   + Coverage     62.25%   62.27%   +0.02%     
     Complexity       69       69              
   ============================================
     Files           353      354       +1     
     Lines         16802    16810       +8     
     Branches       2275     2280       +5     
   ============================================
   + Hits          10460    10469       +9     
   + Misses         5372     5369       -3     
   - Partials        970      972       +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/2332?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...ala/org/apache/kyuubi/session/SessionManager.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2332/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-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXNzaW9uL1Nlc3Npb25NYW5hZ2VyLnNjYWxh) | `87.69% <90.00%> (+0.19%)` | :arrow_up: |
   | [.../engine/flink/session/FlinkSQLSessionManager.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2332/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-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9mbGluay9zZXNzaW9uL0ZsaW5rU1FMU2Vzc2lvbk1hbmFnZXIuc2NhbGE=) | `100.00% <100.00%> (+3.44%)` | :arrow_up: |
   | [...yuubi/engine/hive/session/HiveSessionManager.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2332/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-ZXh0ZXJuYWxzL2t5dXViaS1oaXZlLXNxbC1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL2hpdmUvc2Vzc2lvbi9IaXZlU2Vzc2lvbk1hbmFnZXIuc2NhbGE=) | `80.00% <100.00%> (-0.96%)` | :arrow_down: |
   | [.../engine/spark/session/SparkSQLSessionManager.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2332/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-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9zZXNzaW9uL1NwYXJrU1FMU2Vzc2lvbk1hbmFnZXIuc2NhbGE=) | `76.31% <100.00%> (-4.12%)` | :arrow_down: |
   | [...ubi/engine/trino/session/TrinoSessionManager.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2332/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-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL3Nlc3Npb24vVHJpbm9TZXNzaW9uTWFuYWdlci5zY2FsYQ==) | `69.23% <100.00%> (-6.96%)` | :arrow_down: |
   | [...g/apache/kyuubi/session/KyuubiSessionManager.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2332/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-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXNzaW9uL0t5dXViaVNlc3Npb25NYW5hZ2VyLnNjYWxh) | `96.87% <100.00%> (+17.38%)` | :arrow_up: |
   | [...e/kyuubi/server/KyuubiTBinaryFrontendService.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2332/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-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvS3l1dWJpVEJpbmFyeUZyb250ZW5kU2VydmljZS5zY2FsYQ==) | `84.37% <0.00%> (-12.06%)` | :arrow_down: |
   | [...ache/kyuubi/server/KyuubiRestFrontendService.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2332/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-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvS3l1dWJpUmVzdEZyb250ZW5kU2VydmljZS5zY2FsYQ==) | `82.05% <0.00%> (-11.06%)` | :arrow_down: |
   | [...n/scala/org/apache/kyuubi/KyuubiSQLException.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2332/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-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9LeXV1YmlTUUxFeGNlcHRpb24uc2NhbGE=) | `91.56% <0.00%> (-2.41%)` | :arrow_down: |
   | [...a/org/apache/kyuubi/plugin/SessionConfAdvisor.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/2332/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-ZXh0ZW5zaW9ucy9reXV1Ymktc2VydmVyL2t5dXViaS1zZXJ2ZXItcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvcGx1Z2luL1Nlc3Npb25Db25mQWR2aXNvci5qYXZh) | | |
   | ... and [12 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/2332/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/2332?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/2332?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 [c29d2d8...b74efd8](https://codecov.io/gh/apache/incubator-kyuubi/pull/2332?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] ulysses-you commented on pull request #2332: [KYUUBI #2331] Add createSession method to further abstract openSession

Posted by GitBox <gi...@apache.org>.
ulysses-you commented on PR #2332:
URL: https://github.com/apache/incubator-kyuubi/pull/2332#issuecomment-1097470717

   what's the semantics of `createSession`, I can not see a clearly definition between `createSession` and `openSession`. e.g. Spark engine, you have already new a spark session at `createSession` phase. Shall we need move them to `openSession` ?


-- 
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] yaooqinn commented on pull request #2332: [KYUUBI #2331] Add createSession method to further abstract openSession

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

   > During the implementation of https://github.com/apache/incubator-kyuubi/issues/2301, I want to add limiter in openSession of SessionManager, So I want to implement openSession method in SessionManager add createSession abstract method.
   
   What is the magic of breaking it into 2 phases? I don't quite follow


-- 
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 pull request #2332: [KYUUBI #2331] Add createSession method to further abstract openSession

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

   We can make the `createSession` method protected.


-- 
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] ulysses-you commented on pull request #2332: [KYUUBI #2331] Add createSession method to further abstract openSession

Posted by GitBox <gi...@apache.org>.
ulysses-you commented on PR #2332:
URL: https://github.com/apache/incubator-kyuubi/pull/2332#issuecomment-1097860194

   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] wForget commented on pull request #2332: [KYUUBI #2331] Add createSession method to further abstract openSession

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

   > What is the magic of breaking it into 2 phases? I don't quite follow
   
   For this pr, it is just an improvement to the previous code, without adding any functional modifications.
   I just want to make the responsibilities of the two phases look more single.


-- 
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 #2332: [KYUUBI #2331] Add createSession method to further abstract openSession

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


##########
externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/session/SparkSQLSessionManager.scala:
##########
@@ -51,12 +51,12 @@ class SparkSQLSessionManager private (name: String, spark: SparkSession)
 
   private lazy val singleSparkSession = conf.get(ENGINE_SINGLE_SPARK_SESSION)
 
-  override def openSession(
+  override def createSession(
       protocol: TProtocolVersion,
       user: String,
       password: String,
       ipAddress: String,
-      conf: Map[String, String]): SessionHandle = {
+      conf: Map[String, String]): Session = {
     val clientIp = conf.getOrElse(CLIENT_IP_KEY, ipAddress)
     info(s"Opening session for $user@$clientIp")

Review Comment:
   > shall we move this to `openSession` ?
   
   yeah, I will do that.



-- 
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 pull request #2332: [KYUUBI #2331] Add createSession method to further abstract openSession

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

   > what's the semantics of `createSession`, I can not see a clearly definition between `createSession` and `openSession`. e.g. Spark engine, you have already new a spark session at `createSession` phase. Shall we need move them to `openSession` ?
   
   This is exactly the same as the previous semantics, `createSession` is just to create a session object for `openSession`.


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