You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by GitBox <gi...@apache.org> on 2022/04/14 03:39:59 UTC

[GitHub] [incubator-kyuubi] zwangsheng opened a new pull request, #2359: [Test] Build WithKyuubiServerOnKuberntes

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

   <!--
   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.
   -->
   Refactor KyuubiOnKubernetesTestsSuite
   Build WithKyuubiServerOnKuberntes like WithKyuubiServerOnYarn
   
   ### _How was this patch tested?_
   - [x] Add some test cases that check the changes thoroughly including negative and positive cases if possible
   
   - [ ] Add screenshots for manual tests if appropriate
   
   - [ ] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request
   


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

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

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


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


[GitHub] [incubator-kyuubi] ulysses-you commented on a diff in pull request #2359: [Test] Build WithKyuubiServerOnKuberntes

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


##########
integration-tests/kyuubi-kubernetes-it/src/test/scala/org/apache/kyuubi/kubernetes/test/WithKyuubiServerOnKubernetes.scala:
##########
@@ -0,0 +1,64 @@
+/*
+ * 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.kubernetes.test
+
+import io.fabric8.kubernetes.client.DefaultKubernetesClient
+
+import org.apache.kyuubi.WithKyuubiServer
+import org.apache.kyuubi.config.KyuubiConf
+
+trait WithKyuubiServerOnKubernetes extends WithKyuubiServer {
+  protected val kyuubiServerConf: KyuubiConf = KyuubiConf()
+  protected val connectionConf: Map[String, String]
+  private var miniKubernetesClient: DefaultKubernetesClient = _
+
+  final override protected lazy val conf: KyuubiConf = {
+    connectionConf.foreach { case (k, v) => kyuubiServerConf.set(k, v) }
+    kyuubiServerConf
+  }
+
+  override def beforeAll(): Unit = {
+    miniKubernetesClient = MiniKube.getKubernetesClient
+    super.beforeAll()
+  }
+
+  override def afterAll(): Unit = super.afterAll()
+
+  override protected def getJdbcUrl: String = {
+    val kyuubiServers =
+      miniKubernetesClient.pods().list().getItems
+    assert(kyuubiServers.size() == 1)
+    val kyuubiServer = kyuubiServers.get(0)
+    // Kyuubi server state should be running since mvn compile is quite slowly..
+    if (!"running".equalsIgnoreCase(kyuubiServer.getStatus.getPhase)) {
+      val log =
+        miniKubernetesClient
+          .pods()
+          .withName(kyuubiServer.getMetadata.getName)
+          .getLog
+      throw new IllegalStateException(
+        s"Kyuubi server pod state error: ${kyuubiServer.getStatus.getPhase}, log:\n$log")
+    }
+    val kyuubiServerIp = MiniKube.getIp
+    val kyuubiServerPort =
+      kyuubiServer.getSpec.getContainers.get(0).getPorts.get(0).getHostPort
+    val _jdbcUrl = s"jdbc:hive2://$kyuubiServerIp:$kyuubiServerPort/;"
+    assert(_jdbcUrl != null, "Failed to get Kyuubi server")

Review Comment:
   this assert is unnecessary that it must be non null



-- 
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] zwangsheng commented on a diff in pull request #2359: [Test] Build WithKyuubiServerOnKuberntes

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


##########
integration-tests/kyuubi-kubernetes-it/src/test/scala/org/apache/kyuubi/kubernetes/test/deployment/KyuubiOnKubernetesTestsSuite.scala:
##########
@@ -31,34 +31,11 @@ import org.apache.kyuubi.operation.SparkQueryTests
  *  |          |         |                                                   |
  *  ------------         -----------------------------------------------------
  */
-class KyuubiOnKubernetesTestsSuite extends SparkQueryTests with Logging {
-  private lazy val _jdbcUrl: String = {
-    val kubernetesclient = MiniKube.getKubernetesClient
-    val kyuubiServers =
-      kubernetesclient
-        .pods()
-        .list()
-        .getItems
-    assert(kyuubiServers.size() == 1)
-    val kyuubiServer = kyuubiServers.get(0)
-    // Kyuubi server state should be running since mvn compile is quite slowly..
-    if (!"running".equalsIgnoreCase(kyuubiServer.getStatus.getPhase)) {
-      val log =
-        kubernetesclient
-          .pods()
-          .withName(kyuubiServer.getMetadata.getName)
-          .getLog
-      throw new IllegalStateException(
-        s"Kyuubi server pod state error: ${kyuubiServer.getStatus.getPhase}, log:\n$log")
-    }
-    val kyuubiServerIp = MiniKube.getIp
-    val kyuubiServerPort =
-      kyuubiServer.getSpec.getContainers.get(0).getPorts.get(0).getHostPort
-    s"jdbc:hive2://$kyuubiServerIp:$kyuubiServerPort/;"
-  }
+class KyuubiOnKubernetesTestsSuite extends WithKyuubiServerOnKubernetes with SparkQueryTests {
+  override protected val kyuubiServerConf: KyuubiConf = KyuubiConf()
+  override protected val connectionConf: Map[String, String] = Map(
+    "spark.master" -> "local",
+    "spark.executor.instances" -> "1")
 
-  override protected def jdbcUrl: String = {
-    assert(_jdbcUrl != null, "Failed to get Kyuubi server")
-    _jdbcUrl
-  }
+  override protected def jdbcUrl: String = getJdbcUrl

Review Comment:
   This method required by `JDBCTestHelper`, pass by `SparkQueryTests`, should be 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: notifications-unsubscribe@kyuubi.apache.org

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


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


[GitHub] [incubator-kyuubi] ulysses-you commented on a diff in pull request #2359: [Test] Build WithKyuubiServerOnKuberntes

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


##########
integration-tests/kyuubi-kubernetes-it/src/test/scala/org/apache/kyuubi/kubernetes/test/WithKyuubiServerOnKubernetes.scala:
##########
@@ -0,0 +1,64 @@
+/*
+ * 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.kubernetes.test
+
+import io.fabric8.kubernetes.client.DefaultKubernetesClient
+
+import org.apache.kyuubi.WithKyuubiServer
+import org.apache.kyuubi.config.KyuubiConf
+
+trait WithKyuubiServerOnKubernetes extends WithKyuubiServer {
+  protected val kyuubiServerConf: KyuubiConf

Review Comment:
   it should not be a required method



-- 
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 #2359: [Test] Build WithKyuubiServerOnKuberntes

Posted by GitBox <gi...@apache.org>.
ulysses-you closed pull request #2359: [Test] Build WithKyuubiServerOnKuberntes
URL: https://github.com/apache/incubator-kyuubi/pull/2359


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

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

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


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


[GitHub] [incubator-kyuubi] ulysses-you commented on a diff in pull request #2359: [Test] Build WithKyuubiServerOnKuberntes

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


##########
integration-tests/kyuubi-kubernetes-it/src/test/scala/org/apache/kyuubi/kubernetes/test/deployment/KyuubiOnKubernetesTestsSuite.scala:
##########
@@ -31,34 +30,10 @@ import org.apache.kyuubi.operation.SparkQueryTests
  *  |          |         |                                                   |
  *  ------------         -----------------------------------------------------
  */
-class KyuubiOnKubernetesTestsSuite extends SparkQueryTests with Logging {
-  private lazy val _jdbcUrl: String = {
-    val kubernetesclient = MiniKube.getKubernetesClient
-    val kyuubiServers =
-      kubernetesclient
-        .pods()
-        .list()
-        .getItems
-    assert(kyuubiServers.size() == 1)
-    val kyuubiServer = kyuubiServers.get(0)
-    // Kyuubi server state should be running since mvn compile is quite slowly..
-    if (!"running".equalsIgnoreCase(kyuubiServer.getStatus.getPhase)) {
-      val log =
-        kubernetesclient
-          .pods()
-          .withName(kyuubiServer.getMetadata.getName)
-          .getLog
-      throw new IllegalStateException(
-        s"Kyuubi server pod state error: ${kyuubiServer.getStatus.getPhase}, log:\n$log")
-    }
-    val kyuubiServerIp = MiniKube.getIp
-    val kyuubiServerPort =
-      kyuubiServer.getSpec.getContainers.get(0).getPorts.get(0).getHostPort
-    s"jdbc:hive2://$kyuubiServerIp:$kyuubiServerPort/;"
-  }
+class KyuubiOnKubernetesTestsSuite extends WithKyuubiServerOnKubernetes with SparkQueryTests {

Review Comment:
   KyuubiOnKubernetesWithLocalSpark



-- 
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] zwangsheng commented on pull request #2359: [Test] Build WithKyuubiServerOnKuberntes

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

   Seems CI test fail, have nothing to do with kubernetes - it test.


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

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

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


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


[GitHub] [incubator-kyuubi] ulysses-you commented on a diff in pull request #2359: [Test] Build WithKyuubiServerOnKuberntes

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


##########
integration-tests/kyuubi-kubernetes-it/src/test/scala/org/apache/kyuubi/kubernetes/test/deployment/KyuubiOnKubernetesTestsSuite.scala:
##########
@@ -31,34 +31,11 @@ import org.apache.kyuubi.operation.SparkQueryTests
  *  |          |         |                                                   |
  *  ------------         -----------------------------------------------------
  */
-class KyuubiOnKubernetesTestsSuite extends SparkQueryTests with Logging {
-  private lazy val _jdbcUrl: String = {
-    val kubernetesclient = MiniKube.getKubernetesClient
-    val kyuubiServers =
-      kubernetesclient
-        .pods()
-        .list()
-        .getItems
-    assert(kyuubiServers.size() == 1)
-    val kyuubiServer = kyuubiServers.get(0)
-    // Kyuubi server state should be running since mvn compile is quite slowly..
-    if (!"running".equalsIgnoreCase(kyuubiServer.getStatus.getPhase)) {
-      val log =
-        kubernetesclient
-          .pods()
-          .withName(kyuubiServer.getMetadata.getName)
-          .getLog
-      throw new IllegalStateException(
-        s"Kyuubi server pod state error: ${kyuubiServer.getStatus.getPhase}, log:\n$log")
-    }
-    val kyuubiServerIp = MiniKube.getIp
-    val kyuubiServerPort =
-      kyuubiServer.getSpec.getContainers.get(0).getPorts.get(0).getHostPort
-    s"jdbc:hive2://$kyuubiServerIp:$kyuubiServerPort/;"
-  }
+class KyuubiOnKubernetesTestsSuite extends WithKyuubiServerOnKubernetes with SparkQueryTests {
+  override protected val kyuubiServerConf: KyuubiConf = KyuubiConf()
+  override protected val connectionConf: Map[String, String] = Map(
+    "spark.master" -> "local",
+    "spark.executor.instances" -> "1")
 
-  override protected def jdbcUrl: String = {
-    assert(_jdbcUrl != null, "Failed to get Kyuubi server")
-    _jdbcUrl
-  }
+  override protected def jdbcUrl: String = getJdbcUrl

Review Comment:
   let's override it in parquet class



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

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

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


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


[GitHub] [incubator-kyuubi] ulysses-you commented on a diff in pull request #2359: [Test] Build WithKyuubiServerOnKuberntes

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


##########
integration-tests/kyuubi-kubernetes-it/src/test/scala/org/apache/kyuubi/kubernetes/test/deployment/KyuubiOnKubernetesTestsSuite.scala:
##########
@@ -31,34 +31,11 @@ import org.apache.kyuubi.operation.SparkQueryTests
  *  |          |         |                                                   |
  *  ------------         -----------------------------------------------------
  */
-class KyuubiOnKubernetesTestsSuite extends SparkQueryTests with Logging {
-  private lazy val _jdbcUrl: String = {
-    val kubernetesclient = MiniKube.getKubernetesClient
-    val kyuubiServers =
-      kubernetesclient
-        .pods()
-        .list()
-        .getItems
-    assert(kyuubiServers.size() == 1)
-    val kyuubiServer = kyuubiServers.get(0)
-    // Kyuubi server state should be running since mvn compile is quite slowly..
-    if (!"running".equalsIgnoreCase(kyuubiServer.getStatus.getPhase)) {
-      val log =
-        kubernetesclient
-          .pods()
-          .withName(kyuubiServer.getMetadata.getName)
-          .getLog
-      throw new IllegalStateException(
-        s"Kyuubi server pod state error: ${kyuubiServer.getStatus.getPhase}, log:\n$log")
-    }
-    val kyuubiServerIp = MiniKube.getIp
-    val kyuubiServerPort =
-      kyuubiServer.getSpec.getContainers.get(0).getPorts.get(0).getHostPort
-    s"jdbc:hive2://$kyuubiServerIp:$kyuubiServerPort/;"
-  }
+class KyuubiOnKubernetesTestsSuite extends WithKyuubiServerOnKubernetes with SparkQueryTests {
+  override protected val kyuubiServerConf: KyuubiConf = KyuubiConf()
+  override protected val connectionConf: Map[String, String] = Map(
+    "spark.master" -> "local",
+    "spark.executor.instances" -> "1")
 
-  override protected def jdbcUrl: String = {
-    assert(_jdbcUrl != null, "Failed to get Kyuubi server")
-    _jdbcUrl
-  }
+  override protected def jdbcUrl: String = getJdbcUrl

Review Comment:
   ah I see



-- 
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 #2359: [Test] Build WithKyuubiServerOnKuberntes

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

   thanks, merging to master


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

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

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


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


[GitHub] [incubator-kyuubi] ulysses-you commented on a diff in pull request #2359: [Test] Build WithKyuubiServerOnKuberntes

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


##########
integration-tests/kyuubi-kubernetes-it/src/test/scala/org/apache/kyuubi/kubernetes/test/WithKyuubiServerOnKubernetes.scala:
##########
@@ -0,0 +1,64 @@
+/*
+ * 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.kubernetes.test
+
+import io.fabric8.kubernetes.client.DefaultKubernetesClient
+
+import org.apache.kyuubi.WithKyuubiServer
+import org.apache.kyuubi.config.KyuubiConf
+
+trait WithKyuubiServerOnKubernetes extends WithKyuubiServer {
+  protected val kyuubiServerConf: KyuubiConf = KyuubiConf()
+  protected val connectionConf: Map[String, String]
+  private var miniKubernetesClient: DefaultKubernetesClient = _
+
+  final override protected lazy val conf: KyuubiConf = {
+    connectionConf.foreach { case (k, v) => kyuubiServerConf.set(k, v) }
+    kyuubiServerConf
+  }
+
+  override def beforeAll(): Unit = {
+    miniKubernetesClient = MiniKube.getKubernetesClient
+    super.beforeAll()
+  }
+
+  override def afterAll(): Unit = super.afterAll()
+
+  override protected def getJdbcUrl: String = {
+    val kyuubiServers =
+      miniKubernetesClient.pods().list().getItems
+    assert(kyuubiServers.size() == 1)
+    val kyuubiServer = kyuubiServers.get(0)
+    // Kyuubi server state should be running since mvn compile is quite slowly..
+    if (!"running".equalsIgnoreCase(kyuubiServer.getStatus.getPhase)) {
+      val log =
+        miniKubernetesClient
+          .pods()
+          .withName(kyuubiServer.getMetadata.getName)
+          .getLog
+      throw new IllegalStateException(
+        s"Kyuubi server pod state error: ${kyuubiServer.getStatus.getPhase}, log:\n$log")
+    }
+    val kyuubiServerIp = MiniKube.getIp
+    val kyuubiServerPort =
+      kyuubiServer.getSpec.getContainers.get(0).getPorts.get(0).getHostPort
+    val _jdbcUrl = s"jdbc:hive2://$kyuubiServerIp:$kyuubiServerPort/;"
+    assert(_jdbcUrl != null, "Failed to get Kyuubi server")

Review Comment:
   just return `s"jdbc:hive2://$kyuubiServerIp:$kyuubiServerPort/;"`



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

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

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


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


[GitHub] [incubator-kyuubi] ulysses-you commented on a diff in pull request #2359: [Test] Build WithKyuubiServerOnKuberntes

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


##########
integration-tests/kyuubi-kubernetes-it/src/test/scala/org/apache/kyuubi/kubernetes/test/deployment/KyuubiOnKubernetesTestsSuite.scala:
##########
@@ -31,34 +31,11 @@ import org.apache.kyuubi.operation.SparkQueryTests
  *  |          |         |                                                   |
  *  ------------         -----------------------------------------------------
  */
-class KyuubiOnKubernetesTestsSuite extends SparkQueryTests with Logging {
-  private lazy val _jdbcUrl: String = {
-    val kubernetesclient = MiniKube.getKubernetesClient
-    val kyuubiServers =
-      kubernetesclient
-        .pods()
-        .list()
-        .getItems
-    assert(kyuubiServers.size() == 1)
-    val kyuubiServer = kyuubiServers.get(0)
-    // Kyuubi server state should be running since mvn compile is quite slowly..
-    if (!"running".equalsIgnoreCase(kyuubiServer.getStatus.getPhase)) {
-      val log =
-        kubernetesclient
-          .pods()
-          .withName(kyuubiServer.getMetadata.getName)
-          .getLog
-      throw new IllegalStateException(
-        s"Kyuubi server pod state error: ${kyuubiServer.getStatus.getPhase}, log:\n$log")
-    }
-    val kyuubiServerIp = MiniKube.getIp
-    val kyuubiServerPort =
-      kyuubiServer.getSpec.getContainers.get(0).getPorts.get(0).getHostPort
-    s"jdbc:hive2://$kyuubiServerIp:$kyuubiServerPort/;"
-  }
+class KyuubiOnKubernetesTestsSuite extends WithKyuubiServerOnKubernetes with SparkQueryTests {
+  override protected val kyuubiServerConf: KyuubiConf = KyuubiConf()
+  override protected val connectionConf: Map[String, String] = Map(
+    "spark.master" -> "local",
+    "spark.executor.instances" -> "1")
 
-  override protected def jdbcUrl: String = {
-    assert(_jdbcUrl != null, "Failed to get Kyuubi server")
-    _jdbcUrl
-  }
+  override protected def jdbcUrl: String = getJdbcUrl

Review Comment:
   let's override it in parent class



-- 
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 #2359: [Test] Build WithKyuubiServerOnKuberntes

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

   # [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/2359?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 [#2359](https://codecov.io/gh/apache/incubator-kyuubi/pull/2359?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (bad6720) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/9e486080ffad43245c84cda9674196f15a226bd8?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9e48608) will **decrease** coverage by `0.01%`.
   > The diff coverage is `n/a`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #2359      +/-   ##
   ============================================
   - Coverage     62.68%   62.67%   -0.02%     
     Complexity       69       69              
   ============================================
     Files           357      357              
     Lines         16915    16899      -16     
     Branches       2276     2278       +2     
   ============================================
   - Hits          10603    10591      -12     
   + Misses         5330     5324       -6     
   - Partials        982      984       +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/2359?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...ubi/engine/trino/session/TrinoSessionManager.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2359/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL3Nlc3Npb24vVHJpbm9TZXNzaW9uTWFuYWdlci5zY2FsYQ==) | `66.66% <0.00%> (-9.53%)` | :arrow_down: |
   | [...apache/kyuubi/engine/hive/HiveProcessBuilder.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2359/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-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9lbmdpbmUvaGl2ZS9IaXZlUHJvY2Vzc0J1aWxkZXIuc2NhbGE=) | `84.61% <0.00%> (-6.30%)` | :arrow_down: |
   | [.../engine/spark/session/SparkSQLSessionManager.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2359/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9zZXNzaW9uL1NwYXJrU1FMU2Vzc2lvbk1hbmFnZXIuc2NhbGE=) | `75.67% <0.00%> (-4.76%)` | :arrow_down: |
   | [...yuubi/engine/hive/session/HiveSessionManager.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2359/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1oaXZlLXNxbC1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL2hpdmUvc2Vzc2lvbi9IaXZlU2Vzc2lvbk1hbmFnZXIuc2NhbGE=) | `80.00% <0.00%> (-1.40%)` | :arrow_down: |
   | [...n/scala/org/apache/kyuubi/KyuubiSQLException.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2359/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9LeXV1YmlTUUxFeGNlcHRpb24uc2NhbGE=) | `91.56% <0.00%> (-1.21%)` | :arrow_down: |
   | [...n/scala/org/apache/kyuubi/engine/ProcBuilder.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2359/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-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9lbmdpbmUvUHJvY0J1aWxkZXIuc2NhbGE=) | `81.87% <0.00%> (-0.93%)` | :arrow_down: |
   | [...ala/org/apache/kyuubi/session/SessionManager.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2359/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXNzaW9uL1Nlc3Npb25NYW5hZ2VyLnNjYWxh) | `87.78% <0.00%> (+0.28%)` | :arrow_up: |
   | [.../org/apache/kyuubi/operation/KyuubiOperation.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2359/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-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vS3l1dWJpT3BlcmF0aW9uLnNjYWxh) | `68.00% <0.00%> (+1.33%)` | :arrow_up: |
   | [...rg/apache/kyuubi/engine/trino/TrinoStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2359/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-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL1RyaW5vU3RhdGVtZW50LnNjYWxh) | `71.26% <0.00%> (+1.38%)` | :arrow_up: |
   | [.../engine/flink/session/FlinkSQLSessionManager.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/2359/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9mbGluay9zZXNzaW9uL0ZsaW5rU1FMU2Vzc2lvbk1hbmFnZXIuc2NhbGE=) | `100.00% <0.00%> (+3.44%)` | :arrow_up: |
   | ... and [1 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/2359/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/2359?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/2359?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 [9e48608...bad6720](https://codecov.io/gh/apache/incubator-kyuubi/pull/2359?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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

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

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


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


[GitHub] [incubator-kyuubi] ulysses-you commented on a diff in pull request #2359: [Test] Build WithKyuubiServerOnKuberntes

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


##########
integration-tests/kyuubi-kubernetes-it/src/test/scala/org/apache/kyuubi/kubernetes/test/ProcessUtils.scala:
##########
@@ -14,6 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+

Review Comment:
   revert



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