You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by "fuweng11 (via GitHub)" <gi...@apache.org> on 2023/02/16 03:42:28 UTC
[GitHub] [inlong] fuweng11 opened a new pull request, #7380: [INLONG-7379][Manager] Add a database name for MySQLSink
fuweng11 opened a new pull request, #7380:
URL: https://github.com/apache/inlong/pull/7380
- Fixes #7379
### Motivation
Add a database name for MySQLSink
### Modifications
Add a database name for MySQLSink
--
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
[GitHub] [inlong] gong commented on a diff in pull request #7380: [INLONG-7379][Manager] Add a database name for MySQLSink
Posted by "gong (via GitHub)" <gi...@apache.org>.
gong commented on code in PR #7380:
URL: https://github.com/apache/inlong/pull/7380#discussion_r1108021901
##########
inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/sink/mysql/MySQLSinkDTO.java:
##########
@@ -185,21 +184,31 @@ private static String getDbNameFromUrl(String jdbcUrl) {
return database;
}
- private static String checkJdbcUrl(String jdbcUrl) {
+ public static String setDbNameToUrl(String jdbcUrl, String databaseName) {
Review Comment:
Maybe add a UT for this method
--
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
[GitHub] [inlong] fuweng11 commented on a diff in pull request #7380: [INLONG-7379][Manager] Add a database name for MySQLSink
Posted by "fuweng11 (via GitHub)" <gi...@apache.org>.
fuweng11 commented on code in PR #7380:
URL: https://github.com/apache/inlong/pull/7380#discussion_r1108027741
##########
inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/sink/mysql/MySQLSinkDTO.java:
##########
@@ -185,21 +184,31 @@ private static String getDbNameFromUrl(String jdbcUrl) {
return database;
}
- private static String checkJdbcUrl(String jdbcUrl) {
+ public static String setDbNameToUrl(String jdbcUrl, String databaseName) {
Review Comment:
done
--
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
[GitHub] [inlong] fuweng11 commented on a diff in pull request #7380: [INLONG-7379][Manager] Add a database name for MySQLSink
Posted by "fuweng11 (via GitHub)" <gi...@apache.org>.
fuweng11 commented on code in PR #7380:
URL: https://github.com/apache/inlong/pull/7380#discussion_r1107992432
##########
inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/sort/util/LoadNodeUtils.java:
##########
@@ -600,7 +601,7 @@ public static MySqlLoadNode createLoadNode(MySQLSink mysqlSink, List<FieldInfo>
null,
null,
properties,
- mysqlSink.getJdbcUrl(),
+ mysqlSink.getJdbcUrl() + InlongConstants.SLASH + mysqlSink.getDatabaseName(),
Review Comment:
I made some changes, you can look at it again.
--
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
[GitHub] [inlong] gong commented on a diff in pull request #7380: [INLONG-7379][Manager] Add a database name for MySQLSink
Posted by "gong (via GitHub)" <gi...@apache.org>.
gong commented on code in PR #7380:
URL: https://github.com/apache/inlong/pull/7380#discussion_r1108022129
##########
inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/sort/util/LoadNodeUtils.java:
##########
@@ -600,7 +601,7 @@ public static MySqlLoadNode createLoadNode(MySQLSink mysqlSink, List<FieldInfo>
null,
null,
properties,
- mysqlSink.getJdbcUrl(),
+ mysqlSink.getJdbcUrl() + InlongConstants.SLASH + mysqlSink.getDatabaseName(),
Review Comment:
ok
--
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
[GitHub] [inlong] dockerzhang merged pull request #7380: [INLONG-7379][Manager] Add a database name for MySQLSink
Posted by "dockerzhang (via GitHub)" <gi...@apache.org>.
dockerzhang merged PR #7380:
URL: https://github.com/apache/inlong/pull/7380
--
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
[GitHub] [inlong] gong commented on a diff in pull request #7380: [INLONG-7379][Manager] Add a database name for MySQLSink
Posted by "gong (via GitHub)" <gi...@apache.org>.
gong commented on code in PR #7380:
URL: https://github.com/apache/inlong/pull/7380#discussion_r1107977788
##########
inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/sort/util/LoadNodeUtils.java:
##########
@@ -600,7 +601,7 @@ public static MySqlLoadNode createLoadNode(MySQLSink mysqlSink, List<FieldInfo>
null,
null,
properties,
- mysqlSink.getJdbcUrl(),
+ mysqlSink.getJdbcUrl() + InlongConstants.SLASH + mysqlSink.getDatabaseName(),
Review Comment:
If jdbcUrl need add other params, this string append can cause exception
--
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