You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by "haifxu (via GitHub)" <gi...@apache.org> on 2024/05/14 02:37:46 UTC
[PR] [INLONG-10076][Manager] Doris data node supports test connections [inlong]
haifxu opened a new pull request, #10217:
URL: https://github.com/apache/inlong/pull/10217
Fixes #10076
### Motivation
Doris data node supports test connections.
### Modifications
Add test connections for Doris data node.
### Verifying this change

--
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@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [INLONG-10076][Manager] Doris data node supports test connections [inlong]
Posted by "aloyszhang (via GitHub)" <gi...@apache.org>.
aloyszhang commented on code in PR #10217:
URL: https://github.com/apache/inlong/pull/10217#discussion_r1599528133
##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/node/doris/DorisDataNodeOperator.java:
##########
@@ -81,4 +86,21 @@ protected void setTargetEntity(DataNodeRequest request, DataNodeEntity targetEnt
}
}
+ @Override
+ public Boolean testConnection(DataNodeRequest request) {
+ String jdbcUrl = MySQLDataNodeDTO.convertToJdbcurl(request.getUrl());
+ String username = request.getUsername();
+ String password = request.getToken();
+ Preconditions.expectNotBlank(jdbcUrl, ErrorCodeEnum.INVALID_PARAMETER, "connection jdbcUrl cannot be empty");
+ try (Connection ignored = MySQLJdbcUtils.getConnection(jdbcUrl, username, password)) {
+ LOGGER.info("doris connection not null - connection success for jdbcUrl={}, username={}, password={}",
+ jdbcUrl, username, password);
Review Comment:
Is it ok to output the plain text of the password?
--
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@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [INLONG-10076][Manager] Doris data node supports test connections [inlong]
Posted by "dockerzhang (via GitHub)" <gi...@apache.org>.
dockerzhang merged PR #10217:
URL: https://github.com/apache/inlong/pull/10217
--
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@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [INLONG-10076][Manager] Doris data node supports test connections [inlong]
Posted by "haifxu (via GitHub)" <gi...@apache.org>.
haifxu commented on code in PR #10217:
URL: https://github.com/apache/inlong/pull/10217#discussion_r1599669419
##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/node/doris/DorisDataNodeOperator.java:
##########
@@ -81,4 +86,21 @@ protected void setTargetEntity(DataNodeRequest request, DataNodeEntity targetEnt
}
}
+ @Override
+ public Boolean testConnection(DataNodeRequest request) {
+ String jdbcUrl = MySQLDataNodeDTO.convertToJdbcurl(request.getUrl());
+ String username = request.getUsername();
+ String password = request.getToken();
+ Preconditions.expectNotBlank(jdbcUrl, ErrorCodeEnum.INVALID_PARAMETER, "connection jdbcUrl cannot be empty");
+ try (Connection ignored = MySQLJdbcUtils.getConnection(jdbcUrl, username, password)) {
+ LOGGER.info("doris connection not null - connection success for jdbcUrl={}, username={}, password={}",
+ jdbcUrl, username, password);
Review Comment:
This is just a test connection to help users confirm whether the wrong password caused the test to fail, so plain text would be better.
--
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@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org