Search in sources :

Example 11 with LRUCache

use of org.apache.kafka.common.cache.LRUCache in project apache-kafka-on-k8s by banzaicloud.

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));
}
Also used : SimpleConfig(org.apache.kafka.connect.transforms.util.SimpleConfig) LRUCache(org.apache.kafka.common.cache.LRUCache)

Example 12 with LRUCache

use of org.apache.kafka.common.cache.LRUCache in project apache-kafka-on-k8s by banzaicloud.

the class ValueToKey method configure.

@Override
public void configure(Map<String, ?> configs) {
    final SimpleConfig config = new SimpleConfig(CONFIG_DEF, configs);
    fields = config.getList(FIELDS_CONFIG);
    valueToKeySchemaCache = new SynchronizedCache<>(new LRUCache<Schema, Schema>(16));
}
Also used : SimpleConfig(org.apache.kafka.connect.transforms.util.SimpleConfig) LRUCache(org.apache.kafka.common.cache.LRUCache)

Example 13 with LRUCache

use of org.apache.kafka.common.cache.LRUCache in project kafka by apache.

the class Flatten method configure.

@Override
public void configure(Map<String, ?> props) {
    final SimpleConfig config = new SimpleConfig(CONFIG_DEF, props);
    delimiter = config.getString(DELIMITER_CONFIG);
    schemaUpdateCache = new SynchronizedCache<>(new LRUCache<>(16));
}
Also used : SimpleConfig(org.apache.kafka.connect.transforms.util.SimpleConfig) LRUCache(org.apache.kafka.common.cache.LRUCache)

Example 14 with LRUCache

use of org.apache.kafka.common.cache.LRUCache 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<>(16));
}
Also used : SimpleConfig(org.apache.kafka.connect.transforms.util.SimpleConfig) LRUCache(org.apache.kafka.common.cache.LRUCache)

Aggregations

LRUCache (org.apache.kafka.common.cache.LRUCache)14 SimpleConfig (org.apache.kafka.connect.transforms.util.SimpleConfig)14 ConfigException (org.apache.kafka.common.config.ConfigException)4 SimpleDateFormat (java.text.SimpleDateFormat)2