This is an automated email from the ASF dual-hosted git repository.
casion pushed a commit to branch dev-1.1.2
in repository https://gitbox.apache.org/repos/asf/incubator-linkis.git
The following commit(s) were added to refs/heads/dev-1.1.2 by this push:
new de573a011 [Bug-2103] Fixed the bug of kinit thread startup when JDBC
is not enabled with kerberos. (#2112)
de573a011 is described below
commit de573a01140a0be90e7e2f0045ed1cea4d60240d
Author: weixiao <[email protected]>
AuthorDate: Fri May 13 21:32:26 2022 +0800
[Bug-2103] Fixed the bug of kinit thread startup when JDBC is not enabled
with kerberos. (#2112)
---
.../linkis/manager/engineplugin/jdbc/conf/JDBCConfiguration.scala | 2 ++
.../engineplugin/jdbc/executer/JDBCEngineConnExecutor.scala | 8 ++++++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git
a/linkis-engineconn-plugins/engineconn-plugins/jdbc/src/main/scala/org/apache/linkis/manager/engineplugin/jdbc/conf/JDBCConfiguration.scala
b/linkis-engineconn-plugins/engineconn-plugins/jdbc/src/main/scala/org/apache/linkis/manager/engineplugin/jdbc/conf/JDBCConfiguration.scala
index a9f6fafa6..900b2e460 100644
---
a/linkis-engineconn-plugins/engineconn-plugins/jdbc/src/main/scala/org/apache/linkis/manager/engineplugin/jdbc/conf/JDBCConfiguration.scala
+++
b/linkis-engineconn-plugins/engineconn-plugins/jdbc/src/main/scala/org/apache/linkis/manager/engineplugin/jdbc/conf/JDBCConfiguration.scala
@@ -32,4 +32,6 @@ object JDBCConfiguration {
val JDBC_SUPPORT_DBS_VALIDATION_QUERY =
CommonVars("wds.linkis.jdbc.support.dbs.validation.query", "mysql=>SELECT
1,postgresql=>SELECT 1,oracle=>SELECT 1 FROM dual,hive2=>SELECT
1,presto=>SELECT 1")
val JDBC_CONCURRENT_LIMIT =
CommonVars[Int]("wds.linkis.engineconn.jdbc.concurrent.limit", 100)
+
+ val JDBC_KERBEROS_ENABLE = CommonVars[Boolean]("wds.linkis.keytab.enable",
false)
}
diff --git
a/linkis-engineconn-plugins/engineconn-plugins/jdbc/src/main/scala/org/apache/linkis/manager/engineplugin/jdbc/executer/JDBCEngineConnExecutor.scala
b/linkis-engineconn-plugins/engineconn-plugins/jdbc/src/main/scala/org/apache/linkis/manager/engineplugin/jdbc/executer/JDBCEngineConnExecutor.scala
index 67c62efdb..1c8f2cbac 100644
---
a/linkis-engineconn-plugins/engineconn-plugins/jdbc/src/main/scala/org/apache/linkis/manager/engineplugin/jdbc/executer/JDBCEngineConnExecutor.scala
+++
b/linkis-engineconn-plugins/engineconn-plugins/jdbc/src/main/scala/org/apache/linkis/manager/engineplugin/jdbc/executer/JDBCEngineConnExecutor.scala
@@ -58,7 +58,9 @@ class JDBCEngineConnExecutor(override val outputPrintLimit:
Int, val id: Int) ex
override def init(): Unit = {
setCodeParser(new SQLCodeParser)
super.init()
- connectionManager.startRefreshKerberosLoginStatusThread()
+ if (JDBCConfiguration.JDBC_KERBEROS_ENABLE.getValue) {
+ connectionManager.startRefreshKerberosLoginStatusThread()
+ }
}
override def executeLine(engineExecutorContext: EngineExecutionContext,
code: String): ExecuteResponse = {
@@ -164,7 +166,9 @@ class JDBCEngineConnExecutor(override val outputPrintLimit:
Int, val id: Int) ex
if (connection != null) {
connection.close()
}
- connectionManager.shutdownRefreshKerberosLoginService()
+ if (JDBCConfiguration.JDBC_KERBEROS_ENABLE.getValue) {
+ connectionManager.shutdownRefreshKerberosLoginService()
+ }
}
override def executeCompletely(engineExecutorContext:
EngineExecutionContext, code: String, completedLine: String): ExecuteResponse =
null
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]