use of com.ververica.cdc.connectors.oceanbase.OceanBaseSource in project flink-cdc-connectors by ververica.
the class OceanBaseTableSource method getScanRuntimeProvider.
@Override
public ScanRuntimeProvider getScanRuntimeProvider(ScanContext context) {
RowType physicalDataType = (RowType) physicalSchema.toPhysicalRowDataType().getLogicalType();
MetadataConverter[] metadataConverters = getMetadataConverters();
TypeInformation<RowData> resultTypeInfo = context.createTypeInformation(producedDataType);
DebeziumDeserializationSchema<RowData> deserializer = RowDataDebeziumDeserializeSchema.newBuilder().setPhysicalRowType(physicalDataType).setMetadataConverters(metadataConverters).setResultTypeInfo(resultTypeInfo).setServerTimeZone(serverTimeZone).build();
OceanBaseSource.Builder<RowData> builder = OceanBaseSource.<RowData>builder().startupMode(startupMode).startupTimestamp(startupTimestamp).username(username).password(password).tenantName(tenantName).databaseName(databaseName).tableName(tableName).hostname(hostname).port(port).connectTimeout(connectTimeout).rsList(rsList).logProxyHost(logProxyHost).logProxyPort(logProxyPort).serverTimeZone(serverTimeZone).deserializer(deserializer);
return SourceFunctionProvider.of(builder.build(), false);
}
Aggregations