Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix typo #2196

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
*/
public interface ConnectionFactory {

public Connection getConnecttion();
public Connection getConnection();

public Connection getConnecttionWithoutRetry();
public Connection getConnectionWithoutRetry();

public String getConnectionInfo();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ public static void dealColumnConf(Configuration originalConfig, ConnectionFactor
boolean isPreCheck = originalConfig.getBool(Key.DRYRUN, false);
List<String> 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,
Expand All @@ -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 {
Expand Down