You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by GitBox <gi...@apache.org> on 2021/10/19 06:23:35 UTC

[GitHub] [incubator-kyuubi] yanghua opened a new pull request #1256: [KYUUBI #1252] Move KyuubiConf#toSparkPrefixedConf out of kyuubi-common module

yanghua opened a new pull request #1256:
URL: https://github.com/apache/incubator-kyuubi/pull/1256


   …
   
   <!--
   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.
   -->
   
   
   ### _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.readthedocs.io/en/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: commits-unsubscribe@kyuubi.apache.org

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



[GitHub] [incubator-kyuubi] yanghua commented on a change in pull request #1256: [KYUUBI #1252] Move KyuubiConf#toSparkPrefixedConf out of kyuubi-common module

Posted by GitBox <gi...@apache.org>.
yanghua commented on a change in pull request #1256:
URL: https://github.com/apache/incubator-kyuubi/pull/1256#discussion_r731599504



##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala
##########
@@ -123,10 +123,20 @@ class SparkProcessBuilder(
     buffer += executable
     buffer += CLASS
     buffer += mainClass
-    conf.toSparkPrefixedConf.foreach { case (k, v) =>
+    // add `spark.` prefix for all the config keys.
+    conf.getAll.foreach { case (k, v) =>
+      var newKey = ""
+      if (k.startsWith("spark.")) {

Review comment:
       comes from the hand of a Scala newbie. aha




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

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



[GitHub] [incubator-kyuubi] pan3793 commented on a change in pull request #1256: [KYUUBI #1252] Move KyuubiConf#toSparkPrefixedConf out of kyuubi-common module

Posted by GitBox <gi...@apache.org>.
pan3793 commented on a change in pull request #1256:
URL: https://github.com/apache/incubator-kyuubi/pull/1256#discussion_r731559981



##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala
##########
@@ -123,7 +124,7 @@ class SparkProcessBuilder(
     buffer += executable
     buffer += CLASS
     buffer += mainClass
-    conf.toSparkPrefixedConf.foreach { case (k, v) =>
+    getSparkPrefixedConf.foreach { case (k, v) =>

Review comment:
       OK, it makes sense to me.




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

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



[GitHub] [incubator-kyuubi] yanghua commented on a change in pull request #1256: [KYUUBI #1252] Move KyuubiConf#toSparkPrefixedConf out of kyuubi-common module

Posted by GitBox <gi...@apache.org>.
yanghua commented on a change in pull request #1256:
URL: https://github.com/apache/incubator-kyuubi/pull/1256#discussion_r731554746



##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala
##########
@@ -123,7 +124,7 @@ class SparkProcessBuilder(
     buffer += executable
     buffer += CLASS
     buffer += mainClass
-    conf.toSparkPrefixedConf.foreach { case (k, v) =>
+    getSparkPrefixedConf.foreach { case (k, v) =>

Review comment:
       > Why the method name changed? We should avoid using getXXX because it is more like the property accessor
   
   The reason is that we move it and inline it into `SparkProcessBuilder`, so removed the **caller** and subject `conf`. `conf.toSparkPrefixedConf` sounds good. But `SparkProcessBuilder#toSparkPrefixedConf` seems weird compared with `SparkProcessBuilder#getSparkPrefixedConf` or `SparkProcessBuilder#covertConfWithSparkPrefix`
   
   Additionally, even it is treated as a property accessor, it looks good, we processed the original `conf` and returned a spark prefixed conf, right?




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

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



[GitHub] [incubator-kyuubi] yaooqinn commented on a change in pull request #1256: [KYUUBI #1252] Move KyuubiConf#toSparkPrefixedConf out of kyuubi-common module

Posted by GitBox <gi...@apache.org>.
yaooqinn commented on a change in pull request #1256:
URL: https://github.com/apache/incubator-kyuubi/pull/1256#discussion_r731653586



##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala
##########
@@ -123,10 +123,20 @@ class SparkProcessBuilder(
     buffer += executable
     buffer += CLASS
     buffer += mainClass
-    conf.toSparkPrefixedConf.foreach { case (k, v) =>
+    // add `spark.` prefix for all the config keys.
+    conf.getAll.foreach { case (k, v) =>
+      var newKey = ""
+      if (k.startsWith("spark.")) {
+        newKey = k
+      } else if (k.startsWith("hadoop.")) {
+        newKey = "spark.hadoop." + k

Review comment:
       I have to admit this is tricky and flaky and does not cover other Hadoop configurations start with `yarn`/`io`/`dfs`.. etc




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

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



[GitHub] [incubator-kyuubi] pan3793 commented on a change in pull request #1256: [KYUUBI #1252] Move KyuubiConf#toSparkPrefixedConf out of kyuubi-common module

Posted by GitBox <gi...@apache.org>.
pan3793 commented on a change in pull request #1256:
URL: https://github.com/apache/incubator-kyuubi/pull/1256#discussion_r731541207



##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala
##########
@@ -123,7 +124,7 @@ class SparkProcessBuilder(
     buffer += executable
     buffer += CLASS
     buffer += mainClass
-    conf.toSparkPrefixedConf.foreach { case (k, v) =>
+    getSparkPrefixedConf.foreach { case (k, v) =>

Review comment:
       Why method name also change? We should avoid using `getXXX` because it is more like the property accessor 




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

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



[GitHub] [incubator-kyuubi] cfmcgrady commented on a change in pull request #1256: [KYUUBI #1252] Move KyuubiConf#toSparkPrefixedConf out of kyuubi-common module

Posted by GitBox <gi...@apache.org>.
cfmcgrady commented on a change in pull request #1256:
URL: https://github.com/apache/incubator-kyuubi/pull/1256#discussion_r731592001



##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala
##########
@@ -123,10 +123,20 @@ class SparkProcessBuilder(
     buffer += executable
     buffer += CLASS
     buffer += mainClass
-    conf.toSparkPrefixedConf.foreach { case (k, v) =>
+    // add `spark.` prefix for all the config keys.
+    conf.getAll.foreach { case (k, v) =>
+      var newKey = ""
+      if (k.startsWith("spark.")) {
+        newKey = k
+      } else if (k.startsWith("hadoop.")) {

Review comment:
       It seems that we don't need to deal with this situation separately?
   We always add `spark.` prefix to the key if it does not start with  `spark.`.




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

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



[GitHub] [incubator-kyuubi] yanghua commented on a change in pull request #1256: [KYUUBI #1252] Move KyuubiConf#toSparkPrefixedConf out of kyuubi-common module

Posted by GitBox <gi...@apache.org>.
yanghua commented on a change in pull request #1256:
URL: https://github.com/apache/incubator-kyuubi/pull/1256#discussion_r731560284



##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala
##########
@@ -123,7 +124,7 @@ class SparkProcessBuilder(
     buffer += executable
     buffer += CLASS
     buffer += mainClass
-    conf.toSparkPrefixedConf.foreach { case (k, v) =>
+    getSparkPrefixedConf.foreach { case (k, v) =>

Review comment:
       >> maybe we can combine map& foreach to a single loop
   
   We can, if this method is only used here. Let me consider how to test 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: commits-unsubscribe@kyuubi.apache.org

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



[GitHub] [incubator-kyuubi] yaooqinn commented on a change in pull request #1256: [KYUUBI #1252] Move KyuubiConf#toSparkPrefixedConf out of kyuubi-common module

Posted by GitBox <gi...@apache.org>.
yaooqinn commented on a change in pull request #1256:
URL: https://github.com/apache/incubator-kyuubi/pull/1256#discussion_r731597248



##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala
##########
@@ -123,10 +123,20 @@ class SparkProcessBuilder(
     buffer += executable
     buffer += CLASS
     buffer += mainClass
-    conf.toSparkPrefixedConf.foreach { case (k, v) =>
+    // add `spark.` prefix for all the config keys.
+    conf.getAll.foreach { case (k, v) =>
+      var newKey = ""
+      if (k.startsWith("spark.")) {

Review comment:
       `val newKey = if (k.startsWith("spark.")) {...`




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

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



[GitHub] [incubator-kyuubi] codecov-commenter edited a comment on pull request #1256: [KYUUBI #1252] Move KyuubiConf#toSparkPrefixedConf out of kyuubi-common module

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1256:
URL: https://github.com/apache/incubator-kyuubi/pull/1256#issuecomment-946415340


   # [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256?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 [#1256](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8a41a29) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/f4094d652492cb20024a26465d6aaa17cc531098?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f4094d6) will **decrease** coverage by `0.00%`.
   > The diff coverage is `85.71%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256/graphs/tree.svg?width=650&height=150&src=pr&token=925D4tb9AH&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #1256      +/-   ##
   ============================================
   - Coverage     73.10%   73.09%   -0.01%     
     Complexity       41       41              
   ============================================
     Files           175      175              
     Lines          6848     6846       -2     
     Branches        835      835              
   ============================================
   - Hits           5006     5004       -2     
     Misses         1441     1441              
     Partials        401      401              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...in/scala/org/apache/kyuubi/config/KyuubiConf.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256/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==) | `95.23% <ø> (-0.07%)` | :arrow_down: |
   | [...ache/kyuubi/engine/spark/SparkProcessBuilder.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256/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==) | `89.77% <85.71%> (+0.61%)` | :arrow_up: |
   | [...g/apache/kyuubi/engine/spark/KyuubiSparkUtil.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256/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=) | `88.46% <0.00%> (-2.85%)` | :arrow_down: |
   | [...he/kyuubi/engine/spark/shim/SparkCatalogShim.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256/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-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9zaGltL1NwYXJrQ2F0YWxvZ1NoaW0uc2NhbGE=) | `78.26% <0.00%> (+1.17%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256?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/1256?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 [f4094d6...8a41a29](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256?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: commits-unsubscribe@kyuubi.apache.org

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



[GitHub] [incubator-kyuubi] yaooqinn commented on a change in pull request #1256: [KYUUBI #1252] Move KyuubiConf#toSparkPrefixedConf out of kyuubi-common module

Posted by GitBox <gi...@apache.org>.
yaooqinn commented on a change in pull request #1256:
URL: https://github.com/apache/incubator-kyuubi/pull/1256#discussion_r731606071



##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala
##########
@@ -123,10 +123,20 @@ class SparkProcessBuilder(
     buffer += executable
     buffer += CLASS
     buffer += mainClass
-    conf.toSparkPrefixedConf.foreach { case (k, v) =>
+    // add `spark.` prefix for all the config keys.
+    conf.getAll.foreach { case (k, v) =>
+      var newKey = ""
+      if (k.startsWith("spark.")) {
+        newKey = k
+      } else if (k.startsWith("hadoop.")) {
+        newKey = "spark.hadoop." + k

Review comment:
       Spark will remove the `spark.hadoop.` prefix if it meets the configs with `spark.hadoop.`




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

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



[GitHub] [incubator-kyuubi] yaooqinn commented on a change in pull request #1256: [KYUUBI #1252] Move KyuubiConf#toSparkPrefixedConf out of kyuubi-common module

Posted by GitBox <gi...@apache.org>.
yaooqinn commented on a change in pull request #1256:
URL: https://github.com/apache/incubator-kyuubi/pull/1256#discussion_r731600638



##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala
##########
@@ -123,10 +123,20 @@ class SparkProcessBuilder(
     buffer += executable
     buffer += CLASS
     buffer += mainClass
-    conf.toSparkPrefixedConf.foreach { case (k, v) =>
+    // add `spark.` prefix for all the config keys.

Review comment:
       we can also move the old comments here




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

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



[GitHub] [incubator-kyuubi] yanghua commented on a change in pull request #1256: [KYUUBI #1252] Move KyuubiConf#toSparkPrefixedConf out of kyuubi-common module

Posted by GitBox <gi...@apache.org>.
yanghua commented on a change in pull request #1256:
URL: https://github.com/apache/incubator-kyuubi/pull/1256#discussion_r731580896



##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala
##########
@@ -123,7 +124,7 @@ class SparkProcessBuilder(
     buffer += executable
     buffer += CLASS
     buffer += mainClass
-    conf.toSparkPrefixedConf.foreach { case (k, v) =>
+    getSparkPrefixedConf.foreach { case (k, v) =>

Review comment:
       yes, addressed




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

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



[GitHub] [incubator-kyuubi] codecov-commenter edited a comment on pull request #1256: [KYUUBI #1252] Move KyuubiConf#toSparkPrefixedConf out of kyuubi-common module

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1256:
URL: https://github.com/apache/incubator-kyuubi/pull/1256#issuecomment-946415340


   # [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256?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 [#1256](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ed39d2d) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/f4094d652492cb20024a26465d6aaa17cc531098?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f4094d6) will **decrease** coverage by `0.00%`.
   > The diff coverage is `87.50%`.
   
   > :exclamation: Current head ed39d2d differs from pull request most recent head e6aa86c. Consider uploading reports for the commit e6aa86c to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256/graphs/tree.svg?width=650&height=150&src=pr&token=925D4tb9AH&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #1256      +/-   ##
   ============================================
   - Coverage     73.10%   73.09%   -0.01%     
     Complexity       41       41              
   ============================================
     Files           175      175              
     Lines          6848     6847       -1     
     Branches        835      835              
   ============================================
   - Hits           5006     5005       -1     
     Misses         1441     1441              
     Partials        401      401              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...in/scala/org/apache/kyuubi/config/KyuubiConf.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256/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==) | `95.23% <ø> (-0.07%)` | :arrow_down: |
   | [...ache/kyuubi/engine/spark/SparkProcessBuilder.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256/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==) | `90.00% <87.50%> (+0.84%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256?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/1256?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 [f4094d6...e6aa86c](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256?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: commits-unsubscribe@kyuubi.apache.org

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



[GitHub] [incubator-kyuubi] yaooqinn commented on a change in pull request #1256: [KYUUBI #1252] Move KyuubiConf#toSparkPrefixedConf out of kyuubi-common module

Posted by GitBox <gi...@apache.org>.
yaooqinn commented on a change in pull request #1256:
URL: https://github.com/apache/incubator-kyuubi/pull/1256#discussion_r731544744



##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala
##########
@@ -123,7 +124,7 @@ class SparkProcessBuilder(
     buffer += executable
     buffer += CLASS
     buffer += mainClass
-    conf.toSparkPrefixedConf.foreach { case (k, v) =>
+    getSparkPrefixedConf.foreach { case (k, v) =>

Review comment:
       maybe we can combine map& foreach to a single loop




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

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



[GitHub] [incubator-kyuubi] cfmcgrady commented on a change in pull request #1256: [KYUUBI #1252] Move KyuubiConf#toSparkPrefixedConf out of kyuubi-common module

Posted by GitBox <gi...@apache.org>.
cfmcgrady commented on a change in pull request #1256:
URL: https://github.com/apache/incubator-kyuubi/pull/1256#discussion_r731600534



##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala
##########
@@ -123,10 +123,20 @@ class SparkProcessBuilder(
     buffer += executable
     buffer += CLASS
     buffer += mainClass
-    conf.toSparkPrefixedConf.foreach { case (k, v) =>
+    // add `spark.` prefix for all the config keys.
+    conf.getAll.foreach { case (k, v) =>
+      var newKey = ""
+      if (k.startsWith("spark.")) {
+        newKey = k
+      } else if (k.startsWith("hadoop.")) {
+        newKey = "spark.hadoop." + k

Review comment:
       Why do we add `spark.hadoop.` prefix instead of `spark.` for the key start with `hadoop.`?




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

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



[GitHub] [incubator-kyuubi] yanghua commented on a change in pull request #1256: [KYUUBI #1252] Move KyuubiConf#toSparkPrefixedConf out of kyuubi-common module

Posted by GitBox <gi...@apache.org>.
yanghua commented on a change in pull request #1256:
URL: https://github.com/apache/incubator-kyuubi/pull/1256#discussion_r731604238



##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala
##########
@@ -123,10 +123,20 @@ class SparkProcessBuilder(
     buffer += executable
     buffer += CLASS
     buffer += mainClass
-    conf.toSparkPrefixedConf.foreach { case (k, v) =>
+    // add `spark.` prefix for all the config keys.

Review comment:
       s.g.




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

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



[GitHub] [incubator-kyuubi] codecov-commenter edited a comment on pull request #1256: [KYUUBI #1252] Move KyuubiConf#toSparkPrefixedConf out of kyuubi-common module

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1256:
URL: https://github.com/apache/incubator-kyuubi/pull/1256#issuecomment-946415340


   # [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256?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 [#1256](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c78a850) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/f4094d652492cb20024a26465d6aaa17cc531098?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f4094d6) will **decrease** coverage by `0.00%`.
   > The diff coverage is `85.71%`.
   
   > :exclamation: Current head c78a850 differs from pull request most recent head 8a41a29. Consider uploading reports for the commit 8a41a29 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256/graphs/tree.svg?width=650&height=150&src=pr&token=925D4tb9AH&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #1256      +/-   ##
   ============================================
   - Coverage     73.10%   73.09%   -0.01%     
     Complexity       41       41              
   ============================================
     Files           175      175              
     Lines          6848     6846       -2     
     Branches        835      835              
   ============================================
   - Hits           5006     5004       -2     
     Misses         1441     1441              
     Partials        401      401              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...in/scala/org/apache/kyuubi/config/KyuubiConf.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256/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==) | `95.23% <ø> (-0.07%)` | :arrow_down: |
   | [...ache/kyuubi/engine/spark/SparkProcessBuilder.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256/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==) | `89.77% <85.71%> (+0.61%)` | :arrow_up: |
   | [...g/apache/kyuubi/engine/spark/KyuubiSparkUtil.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256/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=) | `88.46% <0.00%> (-2.85%)` | :arrow_down: |
   | [...he/kyuubi/engine/spark/shim/SparkCatalogShim.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256/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-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9zaGltL1NwYXJrQ2F0YWxvZ1NoaW0uc2NhbGE=) | `78.26% <0.00%> (+1.17%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256?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/1256?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 [f4094d6...8a41a29](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256?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: commits-unsubscribe@kyuubi.apache.org

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



[GitHub] [incubator-kyuubi] yaooqinn commented on pull request #1256: [KYUUBI #1252] Move KyuubiConf#toSparkPrefixedConf out of kyuubi-common module

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


   thanks, merged 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: commits-unsubscribe@kyuubi.apache.org

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



[GitHub] [incubator-kyuubi] yanghua commented on a change in pull request #1256: [KYUUBI #1252] Move KyuubiConf#toSparkPrefixedConf out of kyuubi-common module

Posted by GitBox <gi...@apache.org>.
yanghua commented on a change in pull request #1256:
URL: https://github.com/apache/incubator-kyuubi/pull/1256#discussion_r731604017



##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala
##########
@@ -123,10 +123,20 @@ class SparkProcessBuilder(
     buffer += executable
     buffer += CLASS
     buffer += mainClass
-    conf.toSparkPrefixedConf.foreach { case (k, v) =>
+    // add `spark.` prefix for all the config keys.
+    conf.getAll.foreach { case (k, v) =>
+      var newKey = ""
+      if (k.startsWith("spark.")) {
+        newKey = k
+      } else if (k.startsWith("hadoop.")) {
+        newKey = "spark.hadoop." + k

Review comment:
       @cfmcgrady Seems you are reasonable. But let's listen to the thoughts that come from original author @yaooqinn .




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

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



[GitHub] [incubator-kyuubi] codecov-commenter commented on pull request #1256: [KYUUBI #1252] Move KyuubiConf#toSparkPrefixedConf out of kyuubi-common module

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


   # [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256?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 [#1256](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ed39d2d) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/f4094d652492cb20024a26465d6aaa17cc531098?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f4094d6) will **decrease** coverage by `0.00%`.
   > The diff coverage is `87.50%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256/graphs/tree.svg?width=650&height=150&src=pr&token=925D4tb9AH&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #1256      +/-   ##
   ============================================
   - Coverage     73.10%   73.09%   -0.01%     
     Complexity       41       41              
   ============================================
     Files           175      175              
     Lines          6848     6847       -1     
     Branches        835      835              
   ============================================
   - Hits           5006     5005       -1     
     Misses         1441     1441              
     Partials        401      401              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...in/scala/org/apache/kyuubi/config/KyuubiConf.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256/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==) | `95.23% <ø> (-0.07%)` | :arrow_down: |
   | [...ache/kyuubi/engine/spark/SparkProcessBuilder.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256/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==) | `90.00% <87.50%> (+0.84%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256?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/1256?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 [f4094d6...ed39d2d](https://codecov.io/gh/apache/incubator-kyuubi/pull/1256?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: commits-unsubscribe@kyuubi.apache.org

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



[GitHub] [incubator-kyuubi] yanghua commented on a change in pull request #1256: [KYUUBI #1252] Move KyuubiConf#toSparkPrefixedConf out of kyuubi-common module

Posted by GitBox <gi...@apache.org>.
yanghua commented on a change in pull request #1256:
URL: https://github.com/apache/incubator-kyuubi/pull/1256#discussion_r731554746



##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala
##########
@@ -123,7 +124,7 @@ class SparkProcessBuilder(
     buffer += executable
     buffer += CLASS
     buffer += mainClass
-    conf.toSparkPrefixedConf.foreach { case (k, v) =>
+    getSparkPrefixedConf.foreach { case (k, v) =>

Review comment:
       > Why the method name changed? We should avoid using getXXX because it is more like the property accessor
   
   The reason is that we move it and inline it into `SparkProcessBuilder`, so removed the **caller** and subject `conf`. `conf.toSparkPrefixedConf` sounds good. But `SparkProcessBuilder#toSparkPrefixedConf` seems weird compared with `SparkProcessBuilder#getSparkPrefixedConf` or `SparkProcessBuilder#covertConfWithSparkPrefix`




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

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



[GitHub] [incubator-kyuubi] yaooqinn commented on a change in pull request #1256: [KYUUBI #1252] Move KyuubiConf#toSparkPrefixedConf out of kyuubi-common module

Posted by GitBox <gi...@apache.org>.
yaooqinn commented on a change in pull request #1256:
URL: https://github.com/apache/incubator-kyuubi/pull/1256#discussion_r731561392



##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala
##########
@@ -123,7 +124,7 @@ class SparkProcessBuilder(
     buffer += executable
     buffer += CLASS
     buffer += mainClass
-    conf.toSparkPrefixedConf.foreach { case (k, v) =>
+    getSparkPrefixedConf.foreach { case (k, v) =>

Review comment:
       toString maybe




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

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



[GitHub] [incubator-kyuubi] cfmcgrady commented on a change in pull request #1256: [KYUUBI #1252] Move KyuubiConf#toSparkPrefixedConf out of kyuubi-common module

Posted by GitBox <gi...@apache.org>.
cfmcgrady commented on a change in pull request #1256:
URL: https://github.com/apache/incubator-kyuubi/pull/1256#discussion_r731679796



##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala
##########
@@ -123,10 +123,20 @@ class SparkProcessBuilder(
     buffer += executable
     buffer += CLASS
     buffer += mainClass
-    conf.toSparkPrefixedConf.foreach { case (k, v) =>
+    // add `spark.` prefix for all the config keys.
+    conf.getAll.foreach { case (k, v) =>
+      var newKey = ""
+      if (k.startsWith("spark.")) {
+        newKey = k
+      } else if (k.startsWith("hadoop.")) {
+        newKey = "spark.hadoop." + k

Review comment:
       Yes, I also found this issue.




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

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



[GitHub] [incubator-kyuubi] pan3793 commented on a change in pull request #1256: [KYUUBI #1252] Move KyuubiConf#toSparkPrefixedConf out of kyuubi-common module

Posted by GitBox <gi...@apache.org>.
pan3793 commented on a change in pull request #1256:
URL: https://github.com/apache/incubator-kyuubi/pull/1256#discussion_r731541207



##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala
##########
@@ -123,7 +124,7 @@ class SparkProcessBuilder(
     buffer += executable
     buffer += CLASS
     buffer += mainClass
-    conf.toSparkPrefixedConf.foreach { case (k, v) =>
+    getSparkPrefixedConf.foreach { case (k, v) =>

Review comment:
       Why the method name changed? We should avoid using `getXXX` because it is more like the property accessor 




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

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



[GitHub] [incubator-kyuubi] yaooqinn closed pull request #1256: [KYUUBI #1252] Move KyuubiConf#toSparkPrefixedConf out of kyuubi-common module

Posted by GitBox <gi...@apache.org>.
yaooqinn closed pull request #1256:
URL: https://github.com/apache/incubator-kyuubi/pull/1256


   


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

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