You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by "ulysses-you (via GitHub)" <gi...@apache.org> on 2023/03/09 10:25:10 UTC

[GitHub] [kyuubi] ulysses-you commented on a diff in pull request #4469: [KYUUBI #4467][K8S][Batch] Get k8s app info with unknown when driver pod not found in limit time range

ulysses-you commented on code in PR #4469:
URL: https://github.com/apache/kyuubi/pull/4469#discussion_r1130774808


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/engine/KubernetesApplicationOperation.scala:
##########
@@ -101,8 +102,23 @@ class KubernetesApplicationOperation extends ApplicationOperation with Logging {
           debug(s"Successfully got application info by $tag: $info")
           info
         } else {
-          // client mode
-          jpsOperation.getApplicationInfoByTag(tag)
+          // Kyuubi should wait second if pod is not be created
+          submitTime match {
+            case Some(time) =>
+              val elapsedTime = System.currentTimeMillis() - time
+              if (elapsedTime > submitTimeout) {
+                error(s"Can't find target driver pod with tag: $tag, " +
+                  s"has elapsed time: ${elapsedTime}ms (limit timeout: ${submitTimeout}ms), " +
+                  s"to submit time: ${submitTimeout}ms")

Review Comment:
   this line seems unnecessary ?



##########
kyuubi-server/src/main/scala/org/apache/kyuubi/engine/ApplicationOperation.scala:
##########
@@ -58,7 +58,7 @@ trait ApplicationOperation {
    * @param tag the unique application tag for engine instance.
    * @return [[ApplicationInfo]]
    */
-  def getApplicationInfoByTag(tag: String): ApplicationInfo
+  def getApplicationInfoByTag(tag: String, submitTime: Option[Long] = None): ApplicationInfo

Review Comment:
   can we add a new method with the default implementation ?
   ```scala
   def getApplicationInfoByTag(tag: String, submitTime: Long) = getApplicationInfoByTag(tag)
   ```



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