use of org.apache.kafka.common.config.ConfigDef in project kafka-connect-storage-cloud by confluentinc.
the class S3SinkConnectorConfig method getConfig.
public static ConfigDef getConfig() {
// Define the names of the configurations we're going to override
Set<String> skip = new HashSet<>();
skip.add(StorageSinkConnectorConfig.SHUTDOWN_TIMEOUT_CONFIG);
// Order added is important, so that group order is maintained
ConfigDef visible = new ConfigDef();
addAllConfigKeys(visible, newConfigDef(), skip);
addAllConfigKeys(visible, StorageCommonConfig.newConfigDef(STORAGE_CLASS_RECOMMENDER), skip);
addAllConfigKeys(visible, PartitionerConfig.newConfigDef(PARTITIONER_CLASS_RECOMMENDER), skip);
return visible;
}
use of org.apache.kafka.common.config.ConfigDef in project debezium by debezium.
the class ByLogicalTableRouter method config.
@Override
public ConfigDef config() {
ConfigDef config = new ConfigDef();
Field.group(config, null, TOPIC_REGEX, TOPIC_REPLACEMENT, KEY_FIELD_REGEX, KEY_FIELD_REPLACEMENT);
return config;
}
use of org.apache.kafka.common.config.ConfigDef in project debezium by debezium.
the class UnwrapFromEnvelope method config.
@Override
public ConfigDef config() {
final ConfigDef config = new ConfigDef();
Field.group(config, null, DROP_TOMBSTONES, DROP_DELETES);
return config;
}
use of org.apache.kafka.common.config.ConfigDef in project debezium by debezium.
the class PostgresConnectorIT method shouldValidateConnectorConfigDef.
@Test
public void shouldValidateConnectorConfigDef() {
connector = new PostgresConnector();
ConfigDef configDef = connector.config();
assertThat(configDef).isNotNull();
PostgresConnectorConfig.ALL_FIELDS.forEach(this::validateFieldDef);
}
use of org.apache.kafka.common.config.ConfigDef in project debezium by debezium.
the class MySqlConnectorTest method assertConfigDefIsValid.
protected static void assertConfigDefIsValid(Connector connector, io.debezium.config.Field.Set fields) {
ConfigDef configDef = connector.config();
assertThat(configDef).isNotNull();
fields.forEach(expected -> {
assertThat(configDef.names()).contains(expected.name());
ConfigKey key = configDef.configKeys().get(expected.name());
assertThat(key).isNotNull();
assertThat(key.name).isEqualTo(expected.name());
assertThat(key.displayName).isEqualTo(expected.displayName());
assertThat(key.importance).isEqualTo(expected.importance());
assertThat(key.documentation).isEqualTo(expected.description());
assertThat(key.type).isEqualTo(expected.type());
if (expected.equals(MySqlConnectorConfig.DATABASE_HISTORY) || expected.equals(MySqlConnectorConfig.JDBC_DRIVER)) {
assertThat(((Class<?>) key.defaultValue).getName()).isEqualTo((String) expected.defaultValue());
} else if (!expected.equals(MySqlConnectorConfig.SERVER_ID)) {
assertThat(key.defaultValue).isEqualTo(expected.defaultValue());
}
assertThat(key.dependents).isEqualTo(expected.dependents());
assertThat(key.width).isNotNull();
assertThat(key.group).isNotNull();
assertThat(key.orderInGroup).isGreaterThan(0);
assertThat(key.validator).isNull();
assertThat(key.recommender).isNull();
});
}
Aggregations