Package io.debezium.processors.reselect
Class ReselectColumnsPostProcessor
java.lang.Object
io.debezium.processors.reselect.ReselectColumnsPostProcessor
- All Implemented Interfaces:
BeanRegistryAware,PostProcessor,ServiceRegistryAware,AutoCloseable
@Incubating
public class ReselectColumnsPostProcessor
extends Object
implements PostProcessor, BeanRegistryAware, ServiceRegistryAware
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate CustomConverterRegistrystatic final io.debezium.config.Fieldprivate JdbcConnectionprivate static final org.slf4j.Loggerprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate booleanprivate booleanprivate booleanprivate RelationalDatabaseSchemaprivate Stringprivate ByteBufferprivate Stringprivate ValueConverterProvider -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidApply the post processor to the supplied key and value.voidclose()Close any resourcesvoidConfigure the post processor.private ObjectgetConvertedValue(TableId tableId, Column column, org.apache.kafka.connect.data.Field field, Object value) getRequiredColumnSelections(TableId tableId, org.apache.kafka.connect.data.Struct after) private TableIdgetTableIdFromSource(org.apache.kafka.connect.data.Struct source) voidinjectBeanRegistry(BeanRegistry beanRegistry) Callback to inject the bean registry.voidinjectServiceRegistry(ServiceRegistry serviceRegistry) Callback to inject the service registry.private booleanisUnavailableArrayValueHolder(org.apache.kafka.connect.data.Schema schema, Object value) private booleanisUnavailableValueHolder(org.apache.kafka.connect.data.Field field, Object value) private booleanisUnavailableValueHolder(org.apache.kafka.connect.data.Schema schema, Object value) private ObjectresolveKeyFieldValue(org.apache.kafka.connect.data.Struct key, org.apache.kafka.connect.data.Field field)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
RESELECT_COLUMNS_INCLUDE_LIST
- See Also:
-
RESELECT_COLUMNS_EXCLUDE_LIST
- See Also:
-
RESELECT_UNAVAILABLE_VALUES
- See Also:
-
RESELECT_NULL_VALUES
- See Also:
-
RESELECT_USE_EVENT_KEY
- See Also:
-
selector
-
reselectNullValues
private boolean reselectNullValues -
reselectUseEventKeyFields
private boolean reselectUseEventKeyFields -
jdbcConnection
-
valueConverterProvider
-
schema
-
connectorConfig
-
customConverterRegistry
-
ERROR_HANDLING_MODE
public static final io.debezium.config.Field ERROR_HANDLING_MODE -
errorHandlingMode
-
-
Constructor Details
-
ReselectColumnsPostProcessor
public ReselectColumnsPostProcessor()
-
-
Method Details
-
configure
Description copied from interface:PostProcessorConfigure the post processor.- Specified by:
configurein interfacePostProcessor- Parameters:
properties- map of configurable properties
-
close
public void close()Description copied from interface:PostProcessorClose any resources- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfacePostProcessor
-
apply
Description copied from interface:PostProcessorApply the post processor to the supplied key and value.- Specified by:
applyin interfacePostProcessor- Parameters:
messageKey- the event's key, may benullvalue- the event's value, may benull
-
injectBeanRegistry
Description copied from interface:BeanRegistryAwareCallback to inject the bean registry.- Specified by:
injectBeanRegistryin interfaceBeanRegistryAware- Parameters:
beanRegistry- the bean registry
-
injectServiceRegistry
Description copied from interface:ServiceRegistryAwareCallback to inject the service registry.- Specified by:
injectServiceRegistryin interfaceServiceRegistryAware- Parameters:
serviceRegistry- the service registry
-
resolveKeyFieldValue
private Object resolveKeyFieldValue(org.apache.kafka.connect.data.Struct key, org.apache.kafka.connect.data.Field field) -
getRequiredColumnSelections
-
getConvertedValue
-
getTableIdFromSource
-