in adb2client/src/main/java/com/alibaba/cloud/analyticdb/adbclient/AdbClient.java [1057:1084]
private void checkDatabaseConfig() {
if (databaseConfig.getTable() == null || databaseConfig.getTable().size() == 0) {
throw new RuntimeException("Table can not be null");
}
for (String tableName : databaseConfig.getTable()) {
if (databaseConfig.getColumns(tableName) == null) {
throw new RuntimeException(String.format("Columns of table %s can not be null", tableName));
}
}
if (databaseConfig.getHost() == null) {
throw new RuntimeException("Host can not be null");
}
if (databaseConfig.getDatabase() == null) {
throw new RuntimeException("Database can not be null");
}
if (databaseConfig.getPassword() == null) {
throw new RuntimeException("Password can not be null");
}
if (databaseConfig.getUser() == null) {
throw new RuntimeException("Username can not be null");
}
if (databaseConfig.getPort() == 0) {
throw new RuntimeException("Port can not be 0");
}
if (databaseConfig.getEmptyAsNull() == null) {
throw new RuntimeException("EmptyAsNull can not be null");
}
}