You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "SbloodyS (via GitHub)" <gi...@apache.org> on 2023/07/19 06:21:39 UTC
[GitHub] [dolphinscheduler] SbloodyS commented on a diff in pull request #14190: [Improvement][plugin] decommission connection pool in kyuubi
SbloodyS commented on code in PR #14190:
URL: https://github.com/apache/dolphinscheduler/pull/14190#discussion_r1267590560
##########
dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java:
##########
@@ -227,8 +230,17 @@ public void executeFuncAndSql(List<SqlBinds> mainStatementsBinds,
try {
// create connection
- connection = DataSourceClientProvider.getInstance().getConnection(DbType.valueOf(sqlParameters.getType()),
- baseConnectionParam);
+ if (DbType.valueOf(sqlParameters.getType()) == KYUUBI) {
+ log.info("full jdbc url : {}, user : {} begin to build a connection",
+ DataSourceUtils.getJdbcUrl(DbType.KYUUBI, baseConnectionParam), baseConnectionParam.getUser());
+ Class.forName(baseConnectionParam.getDriverClassName());
+ connection = DriverManager.getConnection(baseConnectionParam.getJdbcUrl(),
+ baseConnectionParam.getUser(), baseConnectionParam.getPassword());
+ } else {
+ connection =
+ DataSourceClientProvider.getInstance().getConnection(DbType.valueOf(sqlParameters.getType()),
+ baseConnectionParam);
+ }
Review Comment:
I'm not sure if this is a good approach. If there are new data sources or task types in the future that need to share the same implementation.
--
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@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org