use of org.apache.kafka.connect.runtime.isolation.Plugins in project apache-kafka-on-k8s by banzaicloud.
the class TransformationConfigTest method testEmbeddedConfigSetSchemaMetadata.
@Test
public void testEmbeddedConfigSetSchemaMetadata() {
// Validate that we can construct a Connector config containing the extended config for the transform
HashMap<String, String> connProps = new HashMap<>();
connProps.put("name", "foo");
connProps.put("connector.class", MockConnector.class.getName());
connProps.put("transforms", "example");
connProps.put("transforms.example.type", SetSchemaMetadata.Value.class.getName());
// Safe when we're only constructing the config
Plugins plugins = null;
new ConnectorConfig(plugins, connProps);
}
use of org.apache.kafka.connect.runtime.isolation.Plugins in project apache-kafka-on-k8s by banzaicloud.
the class TransformationConfigTest method testEmbeddedConfigReplaceField.
@Test
public void testEmbeddedConfigReplaceField() {
// Validate that we can construct a Connector config containing the extended config for the transform
HashMap<String, String> connProps = new HashMap<>();
connProps.put("name", "foo");
connProps.put("connector.class", MockConnector.class.getName());
connProps.put("transforms", "example");
connProps.put("transforms.example.type", ReplaceField.Value.class.getName());
// Safe when we're only constructing the config
Plugins plugins = null;
new ConnectorConfig(plugins, connProps);
}
use of org.apache.kafka.connect.runtime.isolation.Plugins in project apache-kafka-on-k8s by banzaicloud.
the class TransformationConfigTest method testEmbeddedConfigMaskField.
@Test
public void testEmbeddedConfigMaskField() {
// Validate that we can construct a Connector config containing the extended config for the transform
HashMap<String, String> connProps = new HashMap<>();
connProps.put("name", "foo");
connProps.put("connector.class", MockConnector.class.getName());
connProps.put("transforms", "example");
connProps.put("transforms.example.type", MaskField.Value.class.getName());
connProps.put("transforms.example.fields", "field");
// Safe when we're only constructing the config
Plugins plugins = null;
new ConnectorConfig(plugins, connProps);
}
use of org.apache.kafka.connect.runtime.isolation.Plugins in project apache-kafka-on-k8s by banzaicloud.
the class TransformationConfigTest method testEmbeddedConfigTimestampConverter.
@Test
public void testEmbeddedConfigTimestampConverter() {
// Validate that we can construct a Connector config containing the extended config for the transform
HashMap<String, String> connProps = new HashMap<>();
connProps.put("name", "foo");
connProps.put("connector.class", MockConnector.class.getName());
connProps.put("transforms", "example");
connProps.put("transforms.example.type", TimestampConverter.Value.class.getName());
connProps.put("transforms.example.target.type", "unix");
// Safe when we're only constructing the config
Plugins plugins = null;
new ConnectorConfig(plugins, connProps);
}
use of org.apache.kafka.connect.runtime.isolation.Plugins in project apache-kafka-on-k8s by banzaicloud.
the class TransformationConfigTest method testEmbeddedConfigInsertField.
@Test
public void testEmbeddedConfigInsertField() {
// Validate that we can construct a Connector config containing the extended config for the transform
HashMap<String, String> connProps = new HashMap<>();
connProps.put("name", "foo");
connProps.put("connector.class", MockConnector.class.getName());
connProps.put("transforms", "example");
connProps.put("transforms.example.type", InsertField.Value.class.getName());
// Safe when we're only constructing the config
Plugins plugins = null;
new ConnectorConfig(plugins, connProps);
}
Aggregations