Search in sources :

Example 1 with OceanBaseSource

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);
}
Also used : RowData(org.apache.flink.table.data.RowData) OceanBaseSource(com.ververica.cdc.connectors.oceanbase.OceanBaseSource) MetadataConverter(com.ververica.cdc.debezium.table.MetadataConverter) RowType(org.apache.flink.table.types.logical.RowType)

Aggregations

OceanBaseSource (com.ververica.cdc.connectors.oceanbase.OceanBaseSource)1 MetadataConverter (com.ververica.cdc.debezium.table.MetadataConverter)1 RowData (org.apache.flink.table.data.RowData)1 RowType (org.apache.flink.table.types.logical.RowType)1