use of org.apache.kafka.connect.sink.SinkConnector in project connect-utils by jcustenborder.
the class BaseDocumentationTest method before.
@BeforeEach
public void before() throws MalformedURLException {
log.info("before() - Configuring reflections to use package '{}'", packages());
if (null == this.reflections) {
this.reflections = new Reflections(new ConfigurationBuilder().setUrls(ClasspathHelper.forJavaClassPath()).forPackages(packages()));
}
this.packages = ImmutableSet.copyOf(packages());
List<Class<? extends Transformation>> transformClasses = list(Transformation.class);
List<Class<? extends SourceConnector>> sourceConnectorClasses = list(SourceConnector.class);
List<Class<? extends SinkConnector>> sinkConnectorClasses = list(SinkConnector.class);
this.pluginTemplate = PluginTemplate.from(sourceConnectorClasses, sinkConnectorClasses, transformClasses);
}
use of org.apache.kafka.connect.sink.SinkConnector in project apache-kafka-on-k8s by banzaicloud.
the class DistributedHerder method validateBasicConnectorConfig.
@Override
protected Map<String, ConfigValue> validateBasicConnectorConfig(Connector connector, ConfigDef configDef, Map<String, String> config) {
Map<String, ConfigValue> validatedConfig = super.validateBasicConnectorConfig(connector, configDef, config);
if (connector instanceof SinkConnector) {
ConfigValue validatedName = validatedConfig.get(ConnectorConfig.NAME_CONFIG);
String name = (String) validatedName.value();
if (workerGroupId.equals(SinkUtils.consumerGroupId(name))) {
validatedName.addErrorMessage("Consumer group for sink connector named " + name + " conflicts with Connect worker group " + workerGroupId);
}
}
return validatedConfig;
}
use of org.apache.kafka.connect.sink.SinkConnector in project kafka by apache.
the class DistributedHerder method validateBasicConnectorConfig.
@Override
protected Map<String, ConfigValue> validateBasicConnectorConfig(Connector connector, ConfigDef configDef, Map<String, String> config) {
Map<String, ConfigValue> validatedConfig = super.validateBasicConnectorConfig(connector, configDef, config);
if (connector instanceof SinkConnector) {
ConfigValue validatedName = validatedConfig.get(ConnectorConfig.NAME_CONFIG);
String name = (String) validatedName.value();
if (workerGroupId.equals(SinkUtils.consumerGroupId(name))) {
validatedName.addErrorMessage("Consumer group for sink connector named " + name + " conflicts with Connect worker group " + workerGroupId);
}
}
return validatedConfig;
}
Aggregations