Class ReadToInsertEvent<R extends org.apache.kafka.connect.connector.ConnectRecord<R>>

java.lang.Object
io.debezium.connector.mysql.transforms.ReadToInsertEvent<R>
Type Parameters:
R - the subtype of ConnectRecord on which this transformation will operate
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.kafka.common.Configurable, org.apache.kafka.connect.transforms.Transformation<R>

public class ReadToInsertEvent<R extends org.apache.kafka.connect.connector.ConnectRecord<R>> extends Object implements org.apache.kafka.connect.transforms.Transformation<R>
This SMT allows the MySql connector to emit snapshot events as "c" operation type (CREATE) by changing the 'op' field of the records from "r" (default) to "c".
Author:
Anisha Mohanty
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • smtManager

      private SmtManager<R extends org.apache.kafka.connect.connector.ConnectRecord<R>> smtManager
  • Constructor Details

    • ReadToInsertEvent

      public ReadToInsertEvent()
  • Method Details

    • apply

      public R apply(R record)
      Specified by:
      apply in interface org.apache.kafka.connect.transforms.Transformation<R extends org.apache.kafka.connect.connector.ConnectRecord<R>>
    • config

      public org.apache.kafka.common.config.ConfigDef config()
      Specified by:
      config in interface org.apache.kafka.connect.transforms.Transformation<R extends org.apache.kafka.connect.connector.ConnectRecord<R>>
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface org.apache.kafka.connect.transforms.Transformation<R extends org.apache.kafka.connect.connector.ConnectRecord<R>>
    • configure

      public void configure(Map<String,?> props)
      Specified by:
      configure in interface org.apache.kafka.common.Configurable