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 2022/02/21 01:13:38 UTC

[GitHub] [incubator-kyuubi] SteNicholas commented on a change in pull request #1946: Close the kyuubi connection on launch engine operation failure

SteNicholas commented on a change in pull request #1946:
URL: https://github.com/apache/incubator-kyuubi/pull/1946#discussion_r810718260



##########
File path: kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/KyuubiConnection.java
##########
@@ -937,6 +943,17 @@ public void close() throws SQLException {
     }
   }
 
+  public void closeOnLaunchEngineFailure(Thread logThread) throws SQLException {
+    if (logThread != null && logThread.isAlive()) {
+      logThread.interrupt();
+      try {
+        logThread.join(DEFAULT_ENGINE_LOG_THREAD_TIMEOUT);
+      } catch (Exception e) {
+      }

Review comment:
       Does the `logThread` need to set to null?

##########
File path: kyuubi-hive-jdbc/src/main/java/org/apache/kyuubi/jdbc/hive/KyuubiConnection.java
##########
@@ -78,6 +78,7 @@
 public class KyuubiConnection implements java.sql.Connection, KyuubiLoggable {
   public static final Logger LOG = LoggerFactory.getLogger(KyuubiConnection.class.getName());
   public static final String BEELINE_MODE_PROPERTY = "BEELINE_MODE";
+  public static final int DEFAULT_ENGINE_LOG_THREAD_TIMEOUT = 10 * 1000;

Review comment:
       Could this add an option for log thread timeout?




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