use of org.apache.kafka.connect.transforms.util.SimpleConfig in project kafka by apache.
the class ReplaceField method configure.
@Override
public void configure(Map<String, ?> configs) {
final SimpleConfig config = new SimpleConfig(CONFIG_DEF, configs);
blacklist = config.getList(ConfigName.BLACKLIST);
whitelist = config.getList(ConfigName.WHITELIST);
renames = parseRenameMappings(config.getList(ConfigName.RENAME));
reverseRenames = invert(renames);
schemaUpdateCache = new SynchronizedCache<>(new LRUCache<Schema, Schema>(16));
}
use of org.apache.kafka.connect.transforms.util.SimpleConfig in project kafka by apache.
the class SetSchemaMetadata method configure.
@Override
public void configure(Map<String, ?> configs) {
final SimpleConfig config = new SimpleConfig(CONFIG_DEF, configs);
schemaName = config.getString(ConfigName.SCHEMA_NAME);
schemaVersion = config.getInt(ConfigName.SCHEMA_VERSION);
if (schemaName == null && schemaVersion == null) {
throw new ConfigException("Neither schema name nor version configured");
}
}
use of org.apache.kafka.connect.transforms.util.SimpleConfig in project kafka by apache.
the class HoistField method configure.
@Override
public void configure(Map<String, ?> props) {
final SimpleConfig config = new SimpleConfig(CONFIG_DEF, props);
fieldName = config.getString("field");
schemaUpdateCache = new SynchronizedCache<>(new LRUCache<Schema, Schema>(16));
}
use of org.apache.kafka.connect.transforms.util.SimpleConfig in project kafka by apache.
the class MaskField method configure.
@Override
public void configure(Map<String, ?> props) {
final SimpleConfig config = new SimpleConfig(CONFIG_DEF, props);
maskedFields = new HashSet<>(config.getList(FIELDS_CONFIG));
}
Aggregations