Search in sources :

Example 11 with ConfigValue

use of org.apache.kafka.common.config.ConfigValue in project kafka by apache.

the class Connector method validate.

/**
     * Validate the connector configuration values against configuration definitions.
     * @param connectorConfigs the provided configuration values
     * @return List of Config, each Config contains the updated configuration information given
     * the current configuration values.
     */
public Config validate(Map<String, String> connectorConfigs) {
    ConfigDef configDef = config();
    List<ConfigValue> configValues = configDef.validate(connectorConfigs);
    return new Config(configValues);
}
Also used : ConfigValue(org.apache.kafka.common.config.ConfigValue) Config(org.apache.kafka.common.config.Config) ConfigDef(org.apache.kafka.common.config.ConfigDef)

Aggregations

ConfigValue (org.apache.kafka.common.config.ConfigValue)11 Config (org.apache.kafka.common.config.Config)9 ConfigDef (org.apache.kafka.common.config.ConfigDef)9 Connector (org.apache.kafka.connect.connector.Connector)8 SinkConnector (org.apache.kafka.connect.sink.SinkConnector)8 SourceConnector (org.apache.kafka.connect.source.SourceConnector)8 ConnectorConfig (org.apache.kafka.connect.runtime.ConnectorConfig)7 ConnectorFactory (org.apache.kafka.connect.runtime.ConnectorFactory)7 TaskConfig (org.apache.kafka.connect.runtime.TaskConfig)7 Test (org.junit.Test)7 Herder (org.apache.kafka.connect.runtime.Herder)6 ConnectorInfo (org.apache.kafka.connect.runtime.rest.entities.ConnectorInfo)6 HashMap (java.util.HashMap)5 SinkConnectorConfig (org.apache.kafka.connect.runtime.SinkConnectorConfig)5 WorkerConfig (org.apache.kafka.connect.runtime.WorkerConfig)5 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)5 BadRequestException (org.apache.kafka.connect.runtime.rest.errors.BadRequestException)4 Map (java.util.Map)2 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)2 ConfigKey (org.apache.kafka.common.config.ConfigDef.ConfigKey)2