yaooqinn commented on a change in pull request #1966:
URL: https://github.com/apache/incubator-kyuubi/pull/1966#discussion_r813738938



##########
File path: 
externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/SparkSQLEngine.scala
##########
@@ -168,29 +173,39 @@ object SparkSQLEngine extends Logging {
 
   def main(args: Array[String]): Unit = {
     SignalRegister.registerLogger(logger)
-    var spark: SparkSession = null
-    try {
-      spark = createSpark()
+    setupConf()
+    val submitTime = kyuubiConf.getOption(KYUUBI_ENGINE_SUBMIT_TIME_KEY) match 
{
+      case Some(t) => t.toLong
+      case _ => System.currentTimeMillis()
+    }
+    val initTimeout = kyuubiConf.get(ENGINE_INIT_TIMEOUT)
+    if (System.currentTimeMillis() - submitTime > initTimeout) {
+      throw new KyuubiException(s"The maximum initialization time exceeded.")

Review comment:
       let's enrich the error msg here, mention
   - The total time used
   - the time submitted
   - the ENGINE_INIT_TIMEOUT conf and its limited value




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to