apache / flink-cdc

Flink CDC is a streaming data integration tool
https://nightlies.apache.org/flink/flink-cdc-docs-stable
Apache License 2.0
5.66k stars 1.92k forks source link

com.ververica.cdc.debezium.DebeziumDeserializationSchema add open default method #1078

Closed MyLanPangzi closed 7 months ago

MyLanPangzi commented 2 years ago

Is your feature request related to a problem? Please describe. Becuase DebeziumDeserializationSchema have not default open. we need put initialize in deserialize like this. This manner cannot gracefully initialize some field.

    @Override
    public void deserialize(SourceRecord record, Collector<String> out) throws Exception {
        if (jsonConverter == null) {
            initializeJsonConverter();
        }
        byte[] bytes =
                jsonConverter.fromConnectData(record.topic(), record.valueSchema(), record.value());
        out.collect(new String(bytes));
    }

Can we add defalut open method like this?

void open() throws Exception {}

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

PatrickRen commented 7 months ago

Closing this issue because it was created before version 2.3.0 (2022-11-10). Please try the latest version of Flink CDC to see if the issue has been resolved. If the issue is still valid, kindly report it on Apache Jira under project Flink with component tag Flink CDC. Thank you!