From adf883165fcd8f0f0e6266d77fae0402e23f6484 Mon Sep 17 00:00:00 2001 From: MindFocus Date: Mon, 26 Aug 2024 15:39:50 +0800 Subject: [PATCH 1/3] fix typo --- .../alibaba/datax/plugin/rdbms/util/ConnectionFactory.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin-rdbms-util/src/main/java/com/alibaba/datax/plugin/rdbms/util/ConnectionFactory.java b/plugin-rdbms-util/src/main/java/com/alibaba/datax/plugin/rdbms/util/ConnectionFactory.java index 3aef46b355..8f177bac41 100644 --- a/plugin-rdbms-util/src/main/java/com/alibaba/datax/plugin/rdbms/util/ConnectionFactory.java +++ b/plugin-rdbms-util/src/main/java/com/alibaba/datax/plugin/rdbms/util/ConnectionFactory.java @@ -7,9 +7,9 @@ */ public interface ConnectionFactory { - public Connection getConnecttion(); + public Connection getConnection(); - public Connection getConnecttionWithoutRetry(); + public Connection getConnectionWithoutRetry(); public String getConnectionInfo(); From 025d5009ca281bd5037cdda633b2caaf66dd4186 Mon Sep 17 00:00:00 2001 From: MindFocus Date: Mon, 26 Aug 2024 15:41:03 +0800 Subject: [PATCH 2/3] fix typo --- .../datax/plugin/rdbms/util/JdbcConnectionFactory.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin-rdbms-util/src/main/java/com/alibaba/datax/plugin/rdbms/util/JdbcConnectionFactory.java b/plugin-rdbms-util/src/main/java/com/alibaba/datax/plugin/rdbms/util/JdbcConnectionFactory.java index 2fe3108ece..0404ea1bca 100644 --- a/plugin-rdbms-util/src/main/java/com/alibaba/datax/plugin/rdbms/util/JdbcConnectionFactory.java +++ b/plugin-rdbms-util/src/main/java/com/alibaba/datax/plugin/rdbms/util/JdbcConnectionFactory.java @@ -23,12 +23,12 @@ public JdbcConnectionFactory(DataBaseType dataBaseType, String jdbcUrl, String u } @Override - public Connection getConnecttion() { + public Connection getConnection() { return DBUtil.getConnection(dataBaseType, jdbcUrl, userName, password); } @Override - public Connection getConnecttionWithoutRetry() { + public Connection getConnectionWithoutRetry() { return DBUtil.getConnectionWithoutRetry(dataBaseType, jdbcUrl, userName, password); } From 2b3255bc230b35666feabd3677a087a179417ea4 Mon Sep 17 00:00:00 2001 From: MindFocus Date: Mon, 26 Aug 2024 15:42:04 +0800 Subject: [PATCH 3/3] fix typo --- .../rdbms/writer/util/OriginalConfPretreatmentUtil.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin-rdbms-util/src/main/java/com/alibaba/datax/plugin/rdbms/writer/util/OriginalConfPretreatmentUtil.java b/plugin-rdbms-util/src/main/java/com/alibaba/datax/plugin/rdbms/writer/util/OriginalConfPretreatmentUtil.java index 556e50ac66..04bf479fe3 100755 --- a/plugin-rdbms-util/src/main/java/com/alibaba/datax/plugin/rdbms/writer/util/OriginalConfPretreatmentUtil.java +++ b/plugin-rdbms-util/src/main/java/com/alibaba/datax/plugin/rdbms/writer/util/OriginalConfPretreatmentUtil.java @@ -101,9 +101,9 @@ public static void dealColumnConf(Configuration originalConfig, ConnectionFactor boolean isPreCheck = originalConfig.getBool(Key.DRYRUN, false); List allColumns; if (isPreCheck){ - allColumns = DBUtil.getTableColumnsByConn(DATABASE_TYPE,connectionFactory.getConnecttionWithoutRetry(), oneTable, connectionFactory.getConnectionInfo()); + allColumns = DBUtil.getTableColumnsByConn(DATABASE_TYPE,connectionFactory.getConnectionWithoutRetry(), oneTable, connectionFactory.getConnectionInfo()); }else{ - allColumns = DBUtil.getTableColumnsByConn(DATABASE_TYPE,connectionFactory.getConnecttion(), oneTable, connectionFactory.getConnectionInfo()); + allColumns = DBUtil.getTableColumnsByConn(DATABASE_TYPE,connectionFactory.getConnection(), oneTable, connectionFactory.getConnectionInfo()); } LOG.info("table:[{}] all columns:[\n{}\n].", oneTable, @@ -123,7 +123,7 @@ public static void dealColumnConf(Configuration originalConfig, ConnectionFactor ListUtil.makeSureNoValueDuplicate(userConfiguredColumns, false); Connection connection = null; try { - connection = connectionFactory.getConnecttion(); + connection = connectionFactory.getConnection(); // 检查列是否都为数据库表中正确的列(通过执行一次 select column from table 进行判断) DBUtil.getColumnMetaData(connection, oneTable,StringUtils.join(userConfiguredColumns, ",")); } finally {