You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "wolfboys (via GitHub)" <gi...@apache.org> on 2023/10/28 07:33:49 UTC
[PR] [Improve] registerDriver improvement [doris-flink-connector]
wolfboys opened a new pull request, #219:
URL: https://github.com/apache/doris-flink-connector/pull/219
[Improve] registerDriver improvement
Before get jdbc connection, we need ensure that the driver has been registered, otherwise unexpected bugs may occur. 🐛
--
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@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [Improve] registerDriver improvement [doris-flink-connector]
Posted by "wolfboys (via GitHub)" <gi...@apache.org>.
wolfboys commented on code in PR #219:
URL: https://github.com/apache/doris-flink-connector/pull/219#discussion_r1375382365
##########
flink-doris-connector/src/main/java/org/apache/doris/flink/tools/cdc/oracle/OracleDatabaseSync.java:
##########
@@ -59,9 +59,24 @@
public class OracleDatabaseSync extends DatabaseSync {
private static final Logger LOG = LoggerFactory.getLogger(OracleDatabaseSync.class);
- private static String JDBC_URL = "jdbc:oracle:thin:@%s:%d:%s";
+ private static final String JDBC_URL = "jdbc:oracle:thin:@%s:%d:%s";
- public OracleDatabaseSync() {
+ public OracleDatabaseSync() throws SQLException {
+ super();
+ }
+
+ @Override
+ public void registerDriver() throws SQLException {
+ try {
+ Class.forName("oracle.jdbc.driver.OracleDriver");
+ } catch (ClassNotFoundException ex) {
+ LOG.warn("can not found class oracle.jdbc.driver.OracleDriver, use class oracle.jdbc.OracleDriver");
+ try {
+ Class.forName("com.mysql.jdbc.Driver");
Review Comment:
> This should be the oracle driver?
thanks for your review, fixed.
--
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@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [Improve] registerDriver improvement [doris-flink-connector]
Posted by "JNSimba (via GitHub)" <gi...@apache.org>.
JNSimba commented on code in PR #219:
URL: https://github.com/apache/doris-flink-connector/pull/219#discussion_r1375357421
##########
flink-doris-connector/src/main/java/org/apache/doris/flink/tools/cdc/oracle/OracleDatabaseSync.java:
##########
@@ -59,9 +59,24 @@
public class OracleDatabaseSync extends DatabaseSync {
private static final Logger LOG = LoggerFactory.getLogger(OracleDatabaseSync.class);
- private static String JDBC_URL = "jdbc:oracle:thin:@%s:%d:%s";
+ private static final String JDBC_URL = "jdbc:oracle:thin:@%s:%d:%s";
- public OracleDatabaseSync() {
+ public OracleDatabaseSync() throws SQLException {
+ super();
+ }
+
+ @Override
+ public void registerDriver() throws SQLException {
+ try {
+ Class.forName("oracle.jdbc.driver.OracleDriver");
+ } catch (ClassNotFoundException ex) {
+ LOG.warn("can not found class oracle.jdbc.driver.OracleDriver, use class oracle.jdbc.OracleDriver");
+ try {
+ Class.forName("com.mysql.jdbc.Driver");
Review Comment:
This should be the oracle driver?
--
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@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [Improve] registerDriver improvement [doris-flink-connector]
Posted by "JNSimba (via GitHub)" <gi...@apache.org>.
JNSimba merged PR #219:
URL: https://github.com/apache/doris-flink-connector/pull/219
--
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@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org