zhaohehuhu commented on code in PR #14190:
URL: 
https://github.com/apache/dolphinscheduler/pull/14190#discussion_r1268861726


##########
dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-kyuubi/src/main/java/org/apache/dolphinscheduler/plugin/datasource/kyuubi/KyuubiDataSourceClient.java:
##########
@@ -44,9 +48,13 @@ protected void preInit() {
     @Override
     protected void initClient(BaseConnectionParam baseConnectionParam, DbType 
dbType) {
 
-        this.dataSource = 
JDBCDataSourceProvider.createOneSessionJdbcDataSource(baseConnectionParam, 
dbType);
-        this.jdbcTemplate = new JdbcTemplate(dataSource);
-        log.info("Init {} success.", getClass().getName());
+        this.driverManagerDataSource =
+                new 
DriverManagerDataSource(DataSourceUtils.getJdbcUrl(DbType.KYUUBI, 
baseConnectionParam),
+                        baseConnectionParam.getUser(), 
PasswordUtils.decodePassword(baseConnectionParam.getPassword()));
+        
driverManagerDataSource.setDriverClassName(baseConnectionParam.getDriverClassName());
+        this.jdbcTemplate = new JdbcTemplate(driverManagerDataSource);
+        log.info("Init {} {} success.", getClass().getName(),
+                DataSourceUtils.getJdbcUrl(DbType.KYUUBI, 
baseConnectionParam));

Review Comment:
   DriverManagerDataSource should create a new connection each time, so we 
possibly can stick to that. 



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