Skip to content

Commit

Permalink
DBZ-7618 Implement Versioned interfaces in Transformation and Convert…
Browse files Browse the repository at this point in the history
…er plugins
  • Loading branch information
harveyyue committed Mar 13, 2024
1 parent 7019a4b commit d9806fc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
*/
package io.debezium.connector.cassandra;

import java.util.Properties;

import io.debezium.util.IoUtil;

import java.util.Properties;

/**
* Information about this module.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@

import java.util.Map;

import io.debezium.connector.cassandra.Module;
import org.apache.kafka.common.config.ConfigDef;
import org.apache.kafka.connect.components.Versioned;
import org.apache.kafka.connect.connector.ConnectRecord;
import org.apache.kafka.connect.data.Struct;
import org.apache.kafka.connect.transforms.Transformation;
Expand All @@ -16,11 +18,12 @@
import io.debezium.connector.cassandra.Record;
import io.debezium.data.Envelope;
import io.debezium.transforms.SmtManager;
import io.debezium.util.VersionParser;

/**
* This SMT allows the Cassandra connector to emit events in accordance with {@link Envelope}.
*/
public class EnvelopeTransformation<R extends ConnectRecord<R>> implements Transformation<R> {
public class EnvelopeTransformation<R extends ConnectRecord<R>> implements Transformation<R>, Versioned {

private SmtManager<R> smtManager;

Expand Down Expand Up @@ -77,4 +80,9 @@ public void configure(Map<String, ?> props) {
final Configuration config = Configuration.from(props);
smtManager = new SmtManager<>(config);
}

@Override
public String version() {
return Module.version();
}
}

0 comments on commit d9806fc

Please sign in to comment.