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/02 03:48:35 UTC

[GitHub] [incubator-kyuubi] ulysses-you opened a new pull request, #3175: Add session conf advisor docs

ulysses-you opened a new pull request, #3175:
URL: https://github.com/apache/incubator-kyuubi/pull/3175

   <!--
   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.
   -->
   Add a docs for session conf advisor which includes:
   1. the step of how to use
   2. an example
   
   ### _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 #3175: Add session conf advisor docs

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


##########
docs/extensions/server/configuration.rst:
##########
@@ -18,7 +18,56 @@ Inject Session Conf with Custom Config Advisor
 
 .. versionadded:: 1.5.0
 
-.. caution:: unstable
+Session Conf Advisor
+--------------------
 
-.. warning::
-   This page is still in-progress.
+Kyuubi supports inject session configs with custom config advisor. It is usually used to append or overwrite session configs dynamically, so administrators of Kyuubi can have an ability to control the user specified configs.

Review Comment:
   nit: custom -> customized



-- 
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 #3175: Add session conf advisor docs

Posted by GitBox <gi...@apache.org>.
ulysses-you closed pull request #3175: Add session conf advisor docs
URL: https://github.com/apache/incubator-kyuubi/pull/3175


-- 
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 #3175: Add session conf advisor docs

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

   # [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/3175?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 [#3175](https://codecov.io/gh/apache/incubator-kyuubi/pull/3175?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (43f2cda) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/c6caeb83dea0f6275a80297d7829afe1d3af59e7?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c6caeb8) will **decrease** coverage by `0.04%`.
   > The diff coverage is `n/a`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #3175      +/-   ##
   ============================================
   - Coverage     51.44%   51.39%   -0.05%     
     Complexity        6        6              
   ============================================
     Files           456      456              
     Lines         25422    25422              
     Branches       3540     3540              
   ============================================
   - Hits          13078    13066      -12     
   - Misses        11088    11097       +9     
   - Partials       1256     1259       +3     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/3175?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [.../kyuubi/server/mysql/constant/MySQLErrorCode.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/3175/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: |
   | [...ache/kyuubi/server/mysql/MySQLCommandHandler.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/3175/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-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvTXlTUUxDb21tYW5kSGFuZGxlci5zY2FsYQ==) | `76.13% <0.00%> (-3.41%)` | :arrow_down: |
   | [...ache/kyuubi/server/mysql/MySQLGenericPackets.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/3175/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-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvTXlTUUxHZW5lcmljUGFja2V0cy5zY2FsYQ==) | `76.59% <0.00%> (-2.13%)` | :arrow_down: |
   | [...ache/kyuubi/operation/KyuubiOperationManager.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/3175/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-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vS3l1dWJpT3BlcmF0aW9uTWFuYWdlci5zY2FsYQ==) | `80.82% <0.00%> (-1.37%)` | :arrow_down: |
   | [...ain/scala/org/apache/kyuubi/engine/EngineRef.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/3175/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) | `75.23% <0.00%> (-0.96%)` | :arrow_down: |
   | [...che/kyuubi/server/KyuubiTHttpFrontendService.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/3175/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-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvS3l1dWJpVEh0dHBGcm9udGVuZFNlcnZpY2Uuc2NhbGE=) | `64.23% <0.00%> (-0.73%)` | :arrow_down: |
   | [...a/org/apache/kyuubi/service/TFrontendService.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/3175/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-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2aWNlL1RGcm9udGVuZFNlcnZpY2Uuc2NhbGE=) | `91.17% <0.00%> (-0.30%)` | :arrow_down: |
   | [...g/apache/kyuubi/operation/BatchJobSubmission.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/3175/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) | `74.40% <0.00%> (ø)` | |
   
   Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?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] pan3793 commented on a diff in pull request #3175: Add session conf advisor docs

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


##########
docs/extensions/server/configuration.rst:
##########
@@ -20,5 +20,41 @@ Inject Session Conf with Custom Config Advisor
 
 .. caution:: unstable
 
-.. warning::
-   This page is still in-progress.
+The step inject session conf with custom config advisor
+-------------------
+
+1. create a custom class which implements the `org.apache.kyuubi.plugin.SessionConfAdvisor`.
+2. adding configuration at `kyuubi-defaults.conf`:
+   ```
+   kyuubi.session.conf.advisor=${classname}
+   ```
+3. Compile and put the jar into `KYUUBI_HOME/jars`

Review Comment:
   missing $ ?



-- 
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 a diff in pull request #3175: Add session conf advisor docs

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


##########
docs/extensions/server/configuration.rst:
##########
@@ -18,7 +18,52 @@ Inject Session Conf with Custom Config Advisor
 
 .. versionadded:: 1.5.0
 
-.. caution:: unstable
+The step of inject session conf

Review Comment:
   Can we also elaborate a bit about what is it and what are its common use cases?



-- 
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 #3175: Add session conf advisor docs

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


##########
docs/extensions/server/configuration.rst:
##########
@@ -18,7 +18,52 @@ Inject Session Conf with Custom Config Advisor
 
 .. versionadded:: 1.5.0
 
-.. caution:: unstable
+The step of inject session conf
+-------------------
 
-.. warning::
-   This page is still in-progress.
+1. create a custom class which implements the `org.apache.kyuubi.plugin.SessionConfAdvisor`.
+2. adding configuration at `kyuubi-defaults.conf`:
+
+   .. code-block:: java
+
+      kyuubi.session.conf.advisor=${classname}
+
+3. Compile and put the jar into `$KYUUBI_HOME/jars`

Review Comment:
   Compile => compile,  keep consistent style?



-- 
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 a diff in pull request #3175: Add session conf advisor docs

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


##########
docs/extensions/server/configuration.rst:
##########
@@ -18,7 +18,52 @@ Inject Session Conf with Custom Config Advisor
 
 .. versionadded:: 1.5.0
 
-.. caution:: unstable
+The step of inject session conf
+-------------------
 
-.. warning::
-   This page is still in-progress.
+1. create a custom class which implements the `org.apache.kyuubi.plugin.SessionConfAdvisor`.
+2. adding configuration at `kyuubi-defaults.conf`:
+
+   .. code-block:: java
+
+      kyuubi.session.conf.advisor=${classname}
+
+3. compile and put the jar into `$KYUUBI_HOME/jars`
+
+The `org.apache.kyuubi.plugin.SessionConfAdvisor` has a zero-arg constructor and holds one method with user and session conf and return a new conf map back.

Review Comment:
   returns has the back meaning inside the word, we can remove the last redundant `back`.



-- 
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 a diff in pull request #3175: Add session conf advisor docs

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


##########
docs/extensions/server/configuration.rst:
##########
@@ -18,7 +18,52 @@ Inject Session Conf with Custom Config Advisor
 
 .. versionadded:: 1.5.0
 
-.. caution:: unstable
+The step of inject session conf

Review Comment:
   Can we also elaborate a bit about what is it and what are the common use cases of 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] yaooqinn commented on a diff in pull request #3175: Add session conf advisor docs

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


##########
docs/extensions/server/configuration.rst:
##########
@@ -18,7 +18,52 @@ Inject Session Conf with Custom Config Advisor
 
 .. versionadded:: 1.5.0
 
-.. caution:: unstable
+The step of inject session conf
+-------------------
 
-.. warning::
-   This page is still in-progress.
+1. create a custom class which implements the `org.apache.kyuubi.plugin.SessionConfAdvisor`.
+2. adding configuration at `kyuubi-defaults.conf`:
+
+   .. code-block:: java
+
+      kyuubi.session.conf.advisor=${classname}
+
+3. compile and put the jar into `$KYUUBI_HOME/jars`
+
+The `org.apache.kyuubi.plugin.SessionConfAdvisor` has a zero-arg constructor and holds one method with user and session conf and return a new conf map back.
+
+.. code-block:: java
+
+   public interface SessionConfAdvisor {
+     default Map<String, String> getConfOverlay(String user, Map<String, String> sessionConf) {
+       return Collections.EMPTY_MAP;
+     }
+   }
+
+Note that, the returned conf map will overwrite the original session conf.
+
+Example
+-------------------
+
+We have a custom class `CustomSessionConfAdvisor`:
+
+.. code-block:: java
+
+   @Override
+   public class CustomSessionConfAdvisor {
+     Map<String, String> getConfOverlay(String user, Map<String, String> sessionConf) {
+       if ("uly".equals(user)) {
+         return Collections.singletonMap("spark.driver.memory", "1G");
+       } else {
+         return Collections.EMPTY_MAP;
+       }
+     }
+   }
+
+If a user `uly` create a connection with
+
+.. code-block:: java
+
+   jdbc:hive2://localhost:10009/;hive.server2.proxy.user=uly;#spark.driver.memory=2G
+
+the final Spark application will allocate `spark.driver.memory=1G` rather 2G.

Review Comment:
   `The` or `, the` final Spark application will allocate `1G` rather `than` 2G for the driver jvm. 



-- 
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 #3175: Add session conf advisor docs

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

   >  `` means italic in .rst, if you want to highlight like .md, then ```` is what you need
   
   yes, that is what I need


-- 
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 #3175: Add session conf advisor docs

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


##########
docs/extensions/server/configuration.rst:
##########
@@ -20,5 +20,41 @@ Inject Session Conf with Custom Config Advisor
 
 .. caution:: unstable
 
-.. warning::
-   This page is still in-progress.
+The step inject session conf with custom config advisor
+-------------------
+
+1. create a custom class which implements the `org.apache.kyuubi.plugin.SessionConfAdvisor`.
+2. adding configuration at `kyuubi-defaults.conf`:
+   ```
+   kyuubi.session.conf.advisor=${classname}
+   ```
+3. Compile and put the jar into `KYUUBI_HOME/jars`
+
+The `org.apache.kyuubi.plugin.SessionConfAdvisor` has zero-arg constructor and holds one method with user and session conf and return a new conf map back.
+```java
+public interface SessionConfAdvisor {
+  default Map<String, String> getConfOverlay(String user, Map<String, String> sessionConf) {
+    return Collections.EMPTY_MAP;
+  }
+}
+```
+Note that, the returned conf map will overwrite the original session conf.
+
+Example
+-------------------
+
+We have a custom class `CustomSessionConfAdvisor`:
+```java
+public class CustomSessionConfAdvisor {
+  Map<String, String> getConfOverlay(String user, Map<String, String> sessionConf) {

Review Comment:
   `@override`



-- 
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 a diff in pull request #3175: Add session conf advisor docs

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


##########
docs/extensions/server/configuration.rst:
##########
@@ -18,7 +18,52 @@ Inject Session Conf with Custom Config Advisor
 
 .. versionadded:: 1.5.0
 
-.. caution:: unstable
+The step of inject session conf
+-------------------
 
-.. warning::
-   This page is still in-progress.
+1. create a custom class which implements the `org.apache.kyuubi.plugin.SessionConfAdvisor`.
+2. adding configuration at `kyuubi-defaults.conf`:
+
+   .. code-block:: java
+
+      kyuubi.session.conf.advisor=${classname}
+
+3. compile and put the jar into `$KYUUBI_HOME/jars`
+
+The `org.apache.kyuubi.plugin.SessionConfAdvisor` has a zero-arg constructor and holds one method with user and session conf and return a new conf map back.
+
+.. code-block:: java

Review Comment:
   it belongs to list item 1?



-- 
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 #3175: Add session conf advisor docs

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

   thank you for 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] ulysses-you commented on pull request #3175: Add session conf advisor docs

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

   @yaooqinn @pan3793 @turboFei @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] yaooqinn commented on a diff in pull request #3175: Add session conf advisor docs

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


##########
docs/extensions/server/configuration.rst:
##########
@@ -18,7 +18,52 @@ Inject Session Conf with Custom Config Advisor
 
 .. versionadded:: 1.5.0
 
-.. caution:: unstable
+The step of inject session conf
+-------------------
 
-.. warning::
-   This page is still in-progress.
+1. create a custom class which implements the `org.apache.kyuubi.plugin.SessionConfAdvisor`.
+2. adding configuration at `kyuubi-defaults.conf`:
+
+   .. code-block:: java
+
+      kyuubi.session.conf.advisor=${classname}
+
+3. compile and put the jar into `$KYUUBI_HOME/jars`
+
+The `org.apache.kyuubi.plugin.SessionConfAdvisor` has a zero-arg constructor and holds one method with user and session conf and return a new conf map back.
+
+.. code-block:: java
+
+   public interface SessionConfAdvisor {
+     default Map<String, String> getConfOverlay(String user, Map<String, String> sessionConf) {
+       return Collections.EMPTY_MAP;
+     }
+   }
+
+Note that, the returned conf map will overwrite the original session conf.

Review Comment:
   use .. note:: ....?



-- 
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 a diff in pull request #3175: Add session conf advisor docs

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


##########
docs/extensions/server/configuration.rst:
##########
@@ -18,7 +18,52 @@ Inject Session Conf with Custom Config Advisor
 
 .. versionadded:: 1.5.0
 
-.. caution:: unstable
+The step of inject session conf
+-------------------
 
-.. warning::
-   This page is still in-progress.
+1. create a custom class which implements the `org.apache.kyuubi.plugin.SessionConfAdvisor`.
+2. adding configuration at `kyuubi-defaults.conf`:
+
+   .. code-block:: java
+
+      kyuubi.session.conf.advisor=${classname}
+
+3. compile and put the jar into `$KYUUBI_HOME/jars`
+
+The `org.apache.kyuubi.plugin.SessionConfAdvisor` has a zero-arg constructor and holds one method with user and session conf and return a new conf map back.

Review Comment:
   `and` holds -> `,` holds



-- 
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 a diff in pull request #3175: Add session conf advisor docs

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


##########
docs/extensions/server/configuration.rst:
##########
@@ -18,7 +18,52 @@ Inject Session Conf with Custom Config Advisor
 
 .. versionadded:: 1.5.0
 
-.. caution:: unstable
+The step of inject session conf
+-------------------
 
-.. warning::
-   This page is still in-progress.
+1. create a custom class which implements the `org.apache.kyuubi.plugin.SessionConfAdvisor`.
+2. adding configuration at `kyuubi-defaults.conf`:
+
+   .. code-block:: java
+
+      kyuubi.session.conf.advisor=${classname}
+
+3. compile and put the jar into `$KYUUBI_HOME/jars`
+
+The `org.apache.kyuubi.plugin.SessionConfAdvisor` has a zero-arg constructor and holds one method with user and session conf and return a new conf map back.

Review Comment:
   `returns`



-- 
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 #3175: Add session conf advisor docs

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

   `` means italic in .rst, if you want to highlight like .md, then ```` is what you need


-- 
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 #3175: Add session conf advisor docs

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

   https://github.com/apache/incubator-kyuubi/issues/3100 please link it in the Umbrella.


-- 
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 #3175: Add session conf advisor docs

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


##########
docs/extensions/server/configuration.rst:
##########
@@ -20,5 +20,41 @@ Inject Session Conf with Custom Config Advisor
 
 .. caution:: unstable
 
-.. warning::
-   This page is still in-progress.
+The step inject session conf with custom config advisor

Review Comment:
   The steps of ...



-- 
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 a diff in pull request #3175: Add session conf advisor docs

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


##########
docs/extensions/server/configuration.rst:
##########
@@ -18,7 +18,52 @@ Inject Session Conf with Custom Config Advisor
 
 .. versionadded:: 1.5.0
 
-.. caution:: unstable
+The step of inject session conf

Review Comment:
   the `steps` of `injecting` session `configs`



-- 
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 a diff in pull request #3175: Add session conf advisor docs

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


##########
docs/extensions/server/configuration.rst:
##########
@@ -18,7 +18,52 @@ Inject Session Conf with Custom Config Advisor
 
 .. versionadded:: 1.5.0
 
-.. caution:: unstable
+The step of inject session conf
+-------------------
 
-.. warning::
-   This page is still in-progress.
+1. create a custom class which implements the `org.apache.kyuubi.plugin.SessionConfAdvisor`.
+2. adding configuration at `kyuubi-defaults.conf`:
+
+   .. code-block:: java
+
+      kyuubi.session.conf.advisor=${classname}
+
+3. compile and put the jar into `$KYUUBI_HOME/jars`
+
+The `org.apache.kyuubi.plugin.SessionConfAdvisor` has a zero-arg constructor and holds one method with user and session conf and return a new conf map back.
+
+.. code-block:: java
+
+   public interface SessionConfAdvisor {
+     default Map<String, String> getConfOverlay(String user, Map<String, String> sessionConf) {
+       return Collections.EMPTY_MAP;
+     }
+   }
+
+Note that, the returned conf map will overwrite the original session conf.
+
+Example
+-------------------
+
+We have a custom class `CustomSessionConfAdvisor`:
+
+.. code-block:: java
+
+   @Override
+   public class CustomSessionConfAdvisor {
+     Map<String, String> getConfOverlay(String user, Map<String, String> sessionConf) {
+       if ("uly".equals(user)) {
+         return Collections.singletonMap("spark.driver.memory", "1G");
+       } else {
+         return Collections.EMPTY_MAP;
+       }
+     }
+   }
+
+If a user `uly` create a connection with

Review Comment:
   create`s`



-- 
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 a diff in pull request #3175: Add session conf advisor docs

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


##########
docs/extensions/server/configuration.rst:
##########
@@ -18,7 +18,52 @@ Inject Session Conf with Custom Config Advisor
 
 .. versionadded:: 1.5.0
 
-.. caution:: unstable
+The step of inject session conf
+-------------------
 
-.. warning::
-   This page is still in-progress.
+1. create a custom class which implements the `org.apache.kyuubi.plugin.SessionConfAdvisor`.
+2. adding configuration at `kyuubi-defaults.conf`:
+
+   .. code-block:: java
+
+      kyuubi.session.conf.advisor=${classname}
+
+3. compile and put the jar into `$KYUUBI_HOME/jars`
+
+The `org.apache.kyuubi.plugin.SessionConfAdvisor` has a zero-arg constructor and holds one method with user and session conf and return a new conf map back.
+
+.. code-block:: java
+
+   public interface SessionConfAdvisor {
+     default Map<String, String> getConfOverlay(String user, Map<String, String> sessionConf) {
+       return Collections.EMPTY_MAP;
+     }
+   }
+
+Note that, the returned conf map will overwrite the original session conf.
+
+Example
+-------------------

Review Comment:
   ```suggestion
   -------
   ```



-- 
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 a diff in pull request #3175: Add session conf advisor docs

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


##########
docs/extensions/server/configuration.rst:
##########
@@ -18,7 +18,52 @@ Inject Session Conf with Custom Config Advisor
 
 .. versionadded:: 1.5.0
 
-.. caution:: unstable
+The step of inject session conf
+-------------------
 
-.. warning::
-   This page is still in-progress.
+1. create a custom class which implements the `org.apache.kyuubi.plugin.SessionConfAdvisor`.
+2. adding configuration at `kyuubi-defaults.conf`:
+
+   .. code-block:: java
+
+      kyuubi.session.conf.advisor=${classname}
+
+3. compile and put the jar into `$KYUUBI_HOME/jars`

Review Comment:
   switch 2 & 3?



-- 
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 #3175: Add session conf advisor docs

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

   Flaky test:
   ```
   KyuubiOperationKubernetesClusterClusterModeSuite:
   - Spark Cluster Mode On Kubernetes Kyuubi KubernetesApplicationOperation Suite *** FAILED ***
     failKillResponse._1 was true (SparkOnKubernetesTestsSuite.scala:213)
   ```


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