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/07/24 08:50:15 UTC

[GitHub] [incubator-kyuubi] zhaomin1423 opened a new pull request, #3123: [KYUUBI #3107] [Subtask] DorisSQLEngine - Add process builder

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

   <!--
   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 https://github.com/apache/incubator-kyuubi/issues/3107#issue-1311302964
   ### _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] yaooqinn commented on pull request #3123: [KYUUBI #3107] [Subtask] DorisSQLEngine - Add process builder

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

   please use dev/merge_kyuubi_pr.sh to merge, and update assignee and milestone too
   


-- 
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] zhaomin1423 merged pull request #3123: [KYUUBI #3107] [Subtask] DorisSQLEngine - Add process builder

Posted by GitBox <gi...@apache.org>.
zhaomin1423 merged PR #3123:
URL: https://github.com/apache/incubator-kyuubi/pull/3123


-- 
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 #3123: [KYUUBI #3107] [Subtask] DorisSQLEngine - Add process builder

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


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/engine/jdbc/JdbcProcessBuilder.scala:
##########
@@ -0,0 +1,120 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kyuubi.engine.jdbc
+
+import java.io.File
+import java.nio.file.Paths
+import java.util
+
+import scala.collection.JavaConverters._
+import scala.collection.mutable.ArrayBuffer
+
+import com.google.common.annotations.VisibleForTesting
+
+import org.apache.kyuubi.{Logging, SCALA_COMPILE_VERSION, Utils}
+import org.apache.kyuubi.Utils.REDACTION_REPLACEMENT_TEXT
+import org.apache.kyuubi.config.KyuubiConf
+import org.apache.kyuubi.config.KyuubiConf.{ENGINE_JDBC_CONNECTION_PASSWORD, ENGINE_JDBC_CONNECTION_URL, ENGINE_JDBC_EXTRA_CLASSPATH, ENGINE_JDBC_JAVA_OPTIONS, ENGINE_JDBC_MEMORY}
+import org.apache.kyuubi.config.KyuubiReservedKeys.KYUUBI_SESSION_USER_KEY
+import org.apache.kyuubi.engine.ProcBuilder
+import org.apache.kyuubi.operation.log.OperationLog
+
+class JdbcProcessBuilder(
+    override val proxyUser: String,
+    override val conf: KyuubiConf,
+    val engineRefId: String,
+    val extraEngineLog: Option[OperationLog] = None)
+  extends ProcBuilder with Logging {
+
+  @VisibleForTesting
+  def this(proxyUser: String, conf: KyuubiConf) {
+    this(proxyUser, conf, "")
+  }
+
+  /**
+   * The short name of the engine process builder, we use this for form the engine jar paths now
+   * see `mainResource`
+   */
+  override def shortName: String = "jdbc"
+
+  override protected def module: String = "kyuubi-jdbc-engine"
+
+  /**
+   * The class containing the main method
+   */
+  override protected def mainClass: String = "org.apache.kyuubi.engine.jdbc.JdbcSQLEngine"
+
+  override protected val commands: Array[String] = {
+    require(
+      conf.get(ENGINE_JDBC_CONNECTION_URL).nonEmpty,
+      s"Jdbc server url can not be null! Please set ${ENGINE_JDBC_CONNECTION_URL.key}")
+    val buffer = new ArrayBuffer[String]()
+    buffer += executable
+
+    val memory = conf.get(ENGINE_JDBC_MEMORY)
+    buffer += s"-Xmx$memory"
+
+    val javaOptions = conf.get(ENGINE_JDBC_JAVA_OPTIONS)
+    if (javaOptions.isDefined) {

Review Comment:
   nit: `javaOptions.foreach ...`



-- 
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] zhaomin1423 commented on pull request #3123: [KYUUBI #3107] [Subtask] DorisSQLEngine - Add process builder

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

   > So far LGTM, would u please add an it module for jdbc engine?
   
   Yes, I plan to do it in a new pr.
   
   


-- 
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] zhaomin1423 commented on pull request #3123: [KYUUBI #3107] [Subtask] DorisSQLEngine - Add process builder

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

   <img width="1821" alt="image" src="https://user-images.githubusercontent.com/49054376/183691619-5dabbbc2-15bc-4b82-9117-cfe9f269ebf3.png">
   
   Redacted the kyuubi.engine.jdbc.connection.password using *********(redacted) in the log. @pan3793 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] zhaomin1423 commented on pull request #3123: [KYUUBI #3107] [Subtask] DorisSQLEngine - Add process builder

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

   > please use dev/merge_kyuubi_pr.sh to merge, and update assignee and milestone too
   > 
   
   Thanks for your reminder.


-- 
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] zhaomin1423 commented on pull request #3123: [KYUUBI #3107] [Subtask] DorisSQLEngine - Add process builder

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

   Thanks for your review, 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: 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] zhaomin1423 commented on a diff in pull request #3123: [KYUUBI #3107] [Subtask] DorisSQLEngine - Add process builder

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


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/engine/jdbc/JdbcProcessBuilder.scala:
##########
@@ -0,0 +1,120 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kyuubi.engine.jdbc
+
+import java.io.File
+import java.nio.file.Paths
+import java.util
+
+import scala.collection.JavaConverters._
+import scala.collection.mutable.ArrayBuffer
+
+import com.google.common.annotations.VisibleForTesting
+
+import org.apache.kyuubi.{Logging, SCALA_COMPILE_VERSION, Utils}
+import org.apache.kyuubi.Utils.REDACTION_REPLACEMENT_TEXT
+import org.apache.kyuubi.config.KyuubiConf
+import org.apache.kyuubi.config.KyuubiConf.{ENGINE_JDBC_CONNECTION_PASSWORD, ENGINE_JDBC_CONNECTION_URL, ENGINE_JDBC_EXTRA_CLASSPATH, ENGINE_JDBC_JAVA_OPTIONS, ENGINE_JDBC_MEMORY}
+import org.apache.kyuubi.config.KyuubiReservedKeys.KYUUBI_SESSION_USER_KEY
+import org.apache.kyuubi.engine.ProcBuilder
+import org.apache.kyuubi.operation.log.OperationLog
+
+class JdbcProcessBuilder(
+    override val proxyUser: String,
+    override val conf: KyuubiConf,
+    val engineRefId: String,
+    val extraEngineLog: Option[OperationLog] = None)
+  extends ProcBuilder with Logging {
+
+  @VisibleForTesting
+  def this(proxyUser: String, conf: KyuubiConf) {
+    this(proxyUser, conf, "")
+  }
+
+  /**
+   * The short name of the engine process builder, we use this for form the engine jar paths now
+   * see `mainResource`
+   */
+  override def shortName: String = "jdbc"
+
+  override protected def module: String = "kyuubi-jdbc-engine"
+
+  /**
+   * The class containing the main method
+   */
+  override protected def mainClass: String = "org.apache.kyuubi.engine.jdbc.JdbcSQLEngine"
+
+  override protected val commands: Array[String] = {
+    require(
+      conf.get(ENGINE_JDBC_CONNECTION_URL).nonEmpty,
+      s"Jdbc server url can not be null! Please set ${ENGINE_JDBC_CONNECTION_URL.key}")
+    val buffer = new ArrayBuffer[String]()
+    buffer += executable
+
+    val memory = conf.get(ENGINE_JDBC_MEMORY)
+    buffer += s"-Xmx$memory"
+
+    val javaOptions = conf.get(ENGINE_JDBC_JAVA_OPTIONS)
+    if (javaOptions.isDefined) {

Review Comment:
   Thanks, updated.



-- 
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 #3123: [KYUUBI #3107] [Subtask] DorisSQLEngine - Add process builder

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

   # [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/3123?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 [#3123](https://codecov.io/gh/apache/incubator-kyuubi/pull/3123?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e9c53b2) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/b0685f9b48b038bea681ddd71266349f580ff730?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b0685f9) will **increase** coverage by `0.06%`.
   > The diff coverage is `92.15%`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #3123      +/-   ##
   ============================================
   + Coverage     51.34%   51.40%   +0.06%     
     Complexity        6        6              
   ============================================
     Files           458      459       +1     
     Lines         25389    25439      +50     
     Branches       3536     3538       +2     
   ============================================
   + Hits          13036    13077      +41     
   - Misses        11111    11118       +7     
   - Partials       1242     1244       +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/3123?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...ain/scala/org/apache/kyuubi/engine/EngineRef.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/3123/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) | `73.83% <0.00%> (-1.41%)` | :arrow_down: |
   | [...apache/kyuubi/engine/jdbc/JdbcProcessBuilder.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/3123/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-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9lbmdpbmUvamRiYy9KZGJjUHJvY2Vzc0J1aWxkZXIuc2NhbGE=) | `94.44% <94.44%> (ø)` | |
   | [...in/scala/org/apache/kyuubi/config/KyuubiConf.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/3123/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==) | `97.38% <100.00%> (+0.12%)` | :arrow_up: |
   | [...apache/kyuubi/engine/JpsApplicationOperation.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/3123/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-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9lbmdpbmUvSnBzQXBwbGljYXRpb25PcGVyYXRpb24uc2NhbGE=) | `79.41% <0.00%> (-2.95%)` | :arrow_down: |
   | [...rg/apache/kyuubi/ctl/cmd/log/LogBatchCommand.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/3123/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-a3l1dWJpLWN0bC9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9jdGwvY21kL2xvZy9Mb2dCYXRjaENvbW1hbmQuc2NhbGE=) | `80.00% <0.00%> (-2.00%)` | :arrow_down: |
   | [...ache/kyuubi/operation/KyuubiOperationManager.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/3123/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: |
   | [...yuubi/server/metadata/jdbc/JDBCMetadataStore.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/3123/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-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbWV0YWRhdGEvamRiYy9KREJDTWV0YWRhdGFTdG9yZS5zY2FsYQ==) | `89.27% <0.00%> (-0.70%)` | :arrow_down: |
   | [...a/org/apache/kyuubi/service/TFrontendService.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/3123/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: |
   | [...ubi/engine/spark/SparkTBinaryFrontendService.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/3123/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9TcGFya1RCaW5hcnlGcm9udGVuZFNlcnZpY2Uuc2NhbGE=) | `82.89% <0.00%> (-0.23%)` | :arrow_down: |
   | [...org/apache/kyuubi/operation/ExecuteStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/3123/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-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vRXhlY3V0ZVN0YXRlbWVudC5zY2FsYQ==) | `80.51% <0.00%> (ø)` | |
   | ... and [2 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/3123/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) | |
   
   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 #3123: [KYUUBI #3107] [Subtask] DorisSQLEngine - Add process builder

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


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/engine/jdbc/JdbcProcessBuilder.scala:
##########
@@ -0,0 +1,120 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kyuubi.engine.jdbc
+
+import java.io.File
+import java.nio.file.Paths
+import java.util
+
+import scala.collection.JavaConverters._
+import scala.collection.mutable.ArrayBuffer
+
+import com.google.common.annotations.VisibleForTesting
+
+import org.apache.kyuubi.{Logging, SCALA_COMPILE_VERSION, Utils}
+import org.apache.kyuubi.Utils.REDACTION_REPLACEMENT_TEXT
+import org.apache.kyuubi.config.KyuubiConf
+import org.apache.kyuubi.config.KyuubiConf.{ENGINE_JDBC_CONNECTION_PASSWORD, ENGINE_JDBC_CONNECTION_URL, ENGINE_JDBC_EXTRA_CLASSPATH, ENGINE_JDBC_JAVA_OPTIONS, ENGINE_JDBC_MEMORY}
+import org.apache.kyuubi.config.KyuubiReservedKeys.KYUUBI_SESSION_USER_KEY
+import org.apache.kyuubi.engine.ProcBuilder
+import org.apache.kyuubi.operation.log.OperationLog
+
+class JdbcProcessBuilder(
+    override val proxyUser: String,
+    override val conf: KyuubiConf,
+    val engineRefId: String,
+    val extraEngineLog: Option[OperationLog] = None)
+  extends ProcBuilder with Logging {
+
+  @VisibleForTesting
+  def this(proxyUser: String, conf: KyuubiConf) {
+    this(proxyUser, conf, "")
+  }
+
+  /**
+   * The short name of the engine process builder, we use this for form the engine jar paths now
+   * see `mainResource`
+   */
+  override def shortName: String = "jdbc"
+
+  override protected def module: String = "kyuubi-jdbc-engine"
+
+  /**
+   * The class containing the main method
+   */
+  override protected def mainClass: String = "org.apache.kyuubi.engine.jdbc.JdbcSQLEngine"
+
+  override protected val commands: Array[String] = {
+    require(
+      conf.get(ENGINE_JDBC_CONNECTION_URL).nonEmpty,
+      s"Jdbc server url can not be null! Please set ${ENGINE_JDBC_CONNECTION_URL.key}")
+    val buffer = new ArrayBuffer[String]()
+    buffer += executable
+
+    val memory = conf.get(ENGINE_JDBC_MEMORY)
+    buffer += s"-Xmx$memory"
+
+    val javaOptions = conf.get(ENGINE_JDBC_JAVA_OPTIONS)
+    if (javaOptions.isDefined) {

Review Comment:
   nit: (javaOptions.foreach ...)



-- 
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] zhaomin1423 commented on pull request #3123: [KYUUBI #3107] [Subtask] DorisSQLEngine - Add process builder

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

   Because added all jars to external/jdbc, https://github.com/apache/incubator-kyuubi/pull/3146, so the class paths are modify.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] pan3793 commented on pull request #3123: [KYUUBI #3107] [Subtask] DorisSQLEngine - Add process builder

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

   So far LGTM, would u please add an it module for jdbc engine?


-- 
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] zhaomin1423 commented on pull request #3123: [KYUUBI #3107] [Subtask] DorisSQLEngine - Add process builder

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

   <img width="1693" alt="image" src="https://user-images.githubusercontent.com/49054376/180643184-717dad76-3817-4d66-a2d2-b289e53b23a5.png">
   


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