use of org.apache.inlong.manager.client.api.source.MySQLBinlogSource in project incubator-inlong by apache.
the class InlongStreamSourceTransfer method parseMySQLBinlogSource.
private static MySQLBinlogSource parseMySQLBinlogSource(BinlogSourceResponse response) {
MySQLBinlogSource binlogSource = new MySQLBinlogSource();
binlogSource.setSourceName(response.getSourceName());
binlogSource.setHostname(response.getHostname());
binlogSource.setDataFormat(DataFormat.NONE);
binlogSource.setPort(response.getPort());
binlogSource.setAgentIp(response.getAgentIp());
DefaultAuthentication defaultAuthentication = new DefaultAuthentication(response.getUser(), response.getPassword());
binlogSource.setAuthentication(defaultAuthentication);
binlogSource.setIncludeSchema(response.getIncludeSchema());
binlogSource.setServerTimezone(response.getServerTimezone());
binlogSource.setMonitoredDdl(response.getMonitoredDdl());
binlogSource.setTimestampFormatStandard(response.getTimestampFormatStandard());
binlogSource.setAllMigration(response.isAllMigration());
if (StringUtils.isNotBlank(response.getDatabaseWhiteList())) {
binlogSource.setDbNames(Arrays.asList(response.getDatabaseWhiteList().split(",")));
}
if (StringUtils.isNotBlank(response.getTableWhiteList())) {
binlogSource.setTableNames(Arrays.asList(response.getTableWhiteList().split(",")));
}
return binlogSource;
}
use of org.apache.inlong.manager.client.api.source.MySQLBinlogSource in project incubator-inlong by apache.
the class InlongStreamSourceTransfer method parseMySQLBinlogSource.
private static MySQLBinlogSource parseMySQLBinlogSource(BinlogSourceListResponse response) {
MySQLBinlogSource binlogSource = new MySQLBinlogSource();
binlogSource.setSourceName(response.getSourceName());
binlogSource.setHostname(response.getHostname());
binlogSource.setDataFormat(DataFormat.NONE);
binlogSource.setPort(response.getPort());
DefaultAuthentication defaultAuthentication = new DefaultAuthentication(response.getUser(), response.getPassword());
binlogSource.setAuthentication(defaultAuthentication);
binlogSource.setIncludeSchema(response.getIncludeSchema());
binlogSource.setServerTimezone(response.getServerTimezone());
binlogSource.setMonitoredDdl(response.getMonitoredDdl());
binlogSource.setTimestampFormatStandard(response.getTimestampFormatStandard());
binlogSource.setAllMigration(response.isAllMigration());
if (StringUtils.isNotBlank(response.getDatabaseWhiteList())) {
binlogSource.setDbNames(Arrays.asList(response.getDatabaseWhiteList().split(",")));
}
if (StringUtils.isNotBlank(response.getTableWhiteList())) {
binlogSource.setTableNames(Arrays.asList(response.getTableWhiteList().split(",")));
}
return binlogSource;
}
Aggregations