com.snowflake.kafka.connector.config.TopicToTableValidator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of snowflake-kafka-connector Show documentation
Show all versions of snowflake-kafka-connector Show documentation
Snowflake Kafka Connect Sink Connector
The newest version!
package com.snowflake.kafka.connector.config;
import com.snowflake.kafka.connector.Utils;
import org.apache.kafka.common.config.ConfigDef;
import org.apache.kafka.common.config.ConfigException;
class TopicToTableValidator implements ConfigDef.Validator {
public TopicToTableValidator() {}
public void ensureValid(String name, Object value) {
String s = (String) value;
if (s != null && !s.isEmpty()) // this value is optional and can be empty
{
if (Utils.parseTopicToTableMap(s) == null) {
throw new ConfigException(
name, value, "Format: :,:,...");
}
}
}
public String toString() {
return "Topic to table map format : comma-separated tuples, e.g."
+ " :,:,... ";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy