Package io.debezium.transforms
Class SmtManager<R extends org.apache.kafka.connect.connector.ConnectRecord<R>>
- java.lang.Object
-
- io.debezium.transforms.SmtManager<R>
-
- Type Parameters:
R
- the subtype ofConnectRecord
on which the transformation will operate
public class SmtManager<R extends org.apache.kafka.connect.connector.ConnectRecord<R>> extends Object
A class used by all Debezium supplied SMTs to centralize common logic.- Author:
- Jiri Pechanec
-
-
Field Summary
Fields Modifier and Type Field Description private static org.slf4j.Logger
LOGGER
private static String
RECORD_ENVELOPE_KEY_SCHEMA_NAME_SUFFIX
-
Constructor Summary
Constructors Constructor Description SmtManager(Configuration config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isValidEnvelope(R record)
boolean
isValidKey(R record)
void
validate(Configuration configuration, Field.Set fields)
Validates the suppliedConfiguration
based on the given fields and throws an exception in the event that there are any validation errors.
-
-
-
Field Detail
-
RECORD_ENVELOPE_KEY_SCHEMA_NAME_SUFFIX
private static final String RECORD_ENVELOPE_KEY_SCHEMA_NAME_SUFFIX
- See Also:
- Constant Field Values
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
-
Constructor Detail
-
SmtManager
public SmtManager(Configuration config)
-
-
Method Detail
-
isValidEnvelope
public boolean isValidEnvelope(R record)
-
isValidKey
public boolean isValidKey(R record)
-
validate
public void validate(Configuration configuration, Field.Set fields)
Validates the suppliedConfiguration
based on the given fields and throws an exception in the event that there are any validation errors. The exception thrown will bubble up to the Kafka Connect framework like as if it were a connector field validation error.- Parameters:
configuration
- the configuration, must not benull
fields
- the fields to validate in the configuration- Throws:
org.apache.kafka.common.config.ConfigException
- if any configuration field validation failed
-
-