Class ReselectColumnsPostProcessor

java.lang.Object
io.debezium.processors.reselect.ReselectColumnsPostProcessor
All Implemented Interfaces:
BeanRegistryAware, PostProcessor, AutoCloseable

@Incubating public class ReselectColumnsPostProcessor extends Object implements PostProcessor, BeanRegistryAware
An implementation of the Debezium PostProcessor contract that allows for the re-selection of columns that are populated with the unavailable value placeholder or that the user wishes to have re-queried with the latest state if the column's value happens to be null.
Author:
Chris Cranford
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • RESELECT_COLUMNS_INCLUDE_LIST

      private static final String RESELECT_COLUMNS_INCLUDE_LIST
      See Also:
    • RESELECT_COLUMNS_EXCLUDE_LIST

      private static final String RESELECT_COLUMNS_EXCLUDE_LIST
      See Also:
    • RESELECT_UNAVAILABLE_VALUES

      private static final String RESELECT_UNAVAILABLE_VALUES
      See Also:
    • RESELECT_NULL_VALUES

      private static final String RESELECT_NULL_VALUES
      See Also:
    • RESELECT_USE_EVENT_KEY

      private static final String RESELECT_USE_EVENT_KEY
      See Also:
    • selector

      private Predicate<String> selector
    • reselectUnavailableValues

      private boolean reselectUnavailableValues
    • reselectNullValues

      private boolean reselectNullValues
    • reselectUseEventKeyFields

      private boolean reselectUseEventKeyFields
    • jdbcConnection

      private JdbcConnection jdbcConnection
    • valueConverterProvider

      private ValueConverterProvider valueConverterProvider
    • unavailableValuePlaceholder

      private String unavailableValuePlaceholder
    • unavailableValuePlaceholderBytes

      private byte[] unavailableValuePlaceholderBytes
    • schema

      private RelationalDatabaseSchema schema
  • Constructor Details

    • ReselectColumnsPostProcessor

      public ReselectColumnsPostProcessor()
  • Method Details

    • configure

      public void configure(Map<String,?> properties)
      Description copied from interface: PostProcessor
      Configure the post processor.
      Specified by:
      configure in interface PostProcessor
      Parameters:
      properties - map of configurable properties
    • close

      public void close()
      Description copied from interface: PostProcessor
      Close any resources
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface PostProcessor
    • apply

      public void apply(Object messageKey, org.apache.kafka.connect.data.Struct value)
      Description copied from interface: PostProcessor
      Apply the post processor to the supplied key and value.
      Specified by:
      apply in interface PostProcessor
      Parameters:
      messageKey - the event's key, may be null
      value - the event's value, may be null
    • injectBeanRegistry

      public void injectBeanRegistry(BeanRegistry beanRegistry)
      Description copied from interface: BeanRegistryAware
      Callback to inject the bean registry.
      Specified by:
      injectBeanRegistry in interface BeanRegistryAware
      Parameters:
      beanRegistry - the bean registry
    • getRequiredColumnSelections

      private List<String> getRequiredColumnSelections(TableId tableId, org.apache.kafka.connect.data.Struct after)
    • isUnavailableValueHolder

      private boolean isUnavailableValueHolder(org.apache.kafka.connect.data.Field field, Object value)
    • getConvertedValue

      private Object getConvertedValue(Column column, org.apache.kafka.connect.data.Field field, Object value)
    • getTableIdFromSource

      private TableId getTableIdFromSource(org.apache.kafka.connect.data.Struct source)