You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by zy...@apache.org on 2023/08/05 05:05:41 UTC
[doris] branch revert-22502-jdbc_alive_2 created (now 5837655276)
This is an automated email from the ASF dual-hosted git repository.
zykkk pushed a change to branch revert-22502-jdbc_alive_2
in repository https://gitbox.apache.org/repos/asf/doris.git
at 5837655276 Revert "[improvement](jdbc-catalog) Add Connection Keepalive and Detailed Error Messaging for Druid Pool in FE (#22502)"
This branch includes the following new commits:
new 5837655276 Revert "[improvement](jdbc-catalog) Add Connection Keepalive and Detailed Error Messaging for Druid Pool in FE (#22502)"
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[doris] 01/01: Revert "[improvement](jdbc-catalog) Add Connection Keepalive and Detailed Error Messaging for Druid Pool in FE (#22502)"
Posted by zy...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
zykkk pushed a commit to branch revert-22502-jdbc_alive_2
in repository https://gitbox.apache.org/repos/asf/doris.git
commit 58376552761ba8672553e7f9dc58a760c0fa29ae
Author: zy-kkk <zh...@gmail.com>
AuthorDate: Sat Aug 5 13:05:34 2023 +0800
Revert "[improvement](jdbc-catalog) Add Connection Keepalive and Detailed Error Messaging for Druid Pool in FE (#22502)"
This reverts commit f20664f709152f09c79919379292465d527b0650.
---
.../java/org/apache/doris/external/jdbc/JdbcClient.java | 16 +---------------
1 file changed, 1 insertion(+), 15 deletions(-)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/external/jdbc/JdbcClient.java b/fe/fe-core/src/main/java/org/apache/doris/external/jdbc/JdbcClient.java
index c8f9346155..51a18c67d6 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/external/jdbc/JdbcClient.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/external/jdbc/JdbcClient.java
@@ -45,7 +45,6 @@ import java.sql.SQLException;
import java.sql.Statement;
import java.util.List;
import java.util.Map;
-import java.util.Objects;
@Getter
public class JdbcClient {
@@ -110,9 +109,6 @@ public class JdbcClient {
// to FE to get schema info, and may create connection here, if we set it too long and the url is invalid,
// it may cause the thrift rpc timeout.
dataSource.setMaxWait(5000);
- dataSource.setTestWhileIdle(true);
- dataSource.setTestOnBorrow(false);
- setValidationQuery(dataSource, dbType);
} catch (MalformedURLException e) {
throw new JdbcClientException("MalformedURLException to load class about " + driverUrl, e);
} finally {
@@ -120,16 +116,6 @@ public class JdbcClient {
}
}
- private void setValidationQuery(DruidDataSource ds, String tableType) {
- if (Objects.equals(tableType, JdbcResource.ORACLE)) {
- ds.setValidationQuery("SELECT 1 FROM dual");
- } else if (Objects.equals(tableType, JdbcResource.SAP_HANA)) {
- ds.setValidationQuery("SELECT 1 FROM DUMMY");
- } else {
- ds.setValidationQuery("SELECT 1");
- }
- }
-
public void closeClient() {
dataSource.close();
}
@@ -139,7 +125,7 @@ public class JdbcClient {
try {
conn = dataSource.getConnection();
} catch (Exception e) {
- throw new JdbcClientException("Can not connect to jdbc due to error: %s", e, e.getMessage());
+ throw new JdbcClientException("Can not connect to jdbc", e);
}
return conn;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org