use of org.apache.kafka.connect.runtime.isolation.Plugins in project kafka by apache.
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 kafka by apache.
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 kafka by apache.
the class TransformationConfigTest method testEmbeddedConfigExtractField.
@Test
public void testEmbeddedConfigExtractField() {
// 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", ExtractField.Value.class.getName());
connProps.put("transforms.example.field", "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 kafka by apache.
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