com.github.jcustenborder.kafka.connect.utils.config.ConfigKeyBuilder Java Examples

The following examples show how to use com.github.jcustenborder.kafka.connect.utils.config.ConfigKeyBuilder. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RedisSinkConnectorConfig.java    From kafka-connect-redis with Apache License 2.0 6 votes vote down vote up
public static ConfigDef config() {
  return RedisConnectorConfig.config()
      .define(
          ConfigKeyBuilder.of(OPERATION_TIMEOUT_MS_CONF, ConfigDef.Type.LONG)
              .documentation(OPERATION_TIMEOUT_MS_DOC)
              .defaultValue(10000L)
              .validator(ConfigDef.Range.atLeast(100L))
              .importance(ConfigDef.Importance.MEDIUM)
              .build()
      ).define(
          ConfigKeyBuilder.of(CHARSET_CONF, ConfigDef.Type.STRING)
              .documentation(CHARSET_DOC)
              .defaultValue("UTF-8")
              .validator(Validators.validCharset())
              .recommender(Recommenders.charset())
              .importance(ConfigDef.Importance.LOW)
              .build()
      );
}
 
Example #2
Source File: HttpSolrSinkConnectorConfig.java    From kafka-connect-solr with Apache License 2.0 6 votes vote down vote up
public static ConfigDef config() {
  return SolrSinkConnectorConfig.config()
      .define(
          ConfigKeyBuilder.of(SOLR_URL_CONFIG, ConfigDef.Type.STRING)
              .importance(ConfigDef.Importance.HIGH)
              .documentation(SOLR_URL_DOC)
              .group(SolrSinkConnectorConfig.CONNECTION_GROUP)
              .build()
      ).define(
          ConfigKeyBuilder.of(SOLR_QUEUE_SIZE_CONFIG, ConfigDef.Type.INT)
              .importance(ConfigDef.Importance.HIGH)
              .defaultValue(100)
              .documentation(SOLR_QUEUE_SIZE_DOC)
              .group(SolrSinkConnectorConfig.INDEXING_GROUP)
              .build()
      ).define(
          ConfigKeyBuilder.of(SOLR_THREAD_COUNT_CONFIG, ConfigDef.Type.INT)
              .importance(ConfigDef.Importance.MEDIUM)
              .defaultValue(1)
              .documentation(SOLR_THREAD_COUNT_DOC)
              .group(SolrSinkConnectorConfig.INDEXING_GROUP)
              .build()
      );
}
 
Example #3
Source File: PatternFilterConfig.java    From kafka-connect-transform-common with Apache License 2.0 6 votes vote down vote up
public static ConfigDef config() {
  return new ConfigDef()
      .define(
          ConfigKeyBuilder.of(PATTERN_CONFIG, ConfigDef.Type.STRING)
              .documentation(PATTERN_DOC)
              .importance(ConfigDef.Importance.HIGH)
              .validator(Validators.pattern())
              .build()
      ).define(
          ConfigKeyBuilder.of(FIELD_CONFIG, ConfigDef.Type.LIST)
              .documentation(FIELD_DOC)
              .defaultValue(Collections.emptyList())
              .importance(ConfigDef.Importance.HIGH)
              .build()
      );
}
 
Example #4
Source File: BytesToStringConfig.java    From kafka-connect-transform-common with Apache License 2.0 6 votes vote down vote up
public static ConfigDef config() {
  return new ConfigDef()
      .define(
          ConfigKeyBuilder.of(CHARSET_CONFIG, ConfigDef.Type.STRING)
              .documentation(CHARSET_DOC)
              .defaultValue("UTF-8")
              .importance(ConfigDef.Importance.HIGH)
              .build()
      ).define(
          ConfigKeyBuilder.of(FIELD_CONFIG, ConfigDef.Type.LIST)
              .documentation(FIELD_DOC)
              .defaultValue(Collections.emptyList())
              .importance(ConfigDef.Importance.HIGH)
              .build()
      );
}
 
Example #5
Source File: ToJSONConfig.java    From kafka-connect-transform-common with Apache License 2.0 6 votes vote down vote up
public static ConfigDef config() {
  return new ConfigDef()
      .define(
          ConfigKeyBuilder.of(OUTPUT_SCHEMA_CONFIG, ConfigDef.Type.STRING)
              .documentation(OUTPUT_SCHEMA_DOC)
              .defaultValue(Schema.Type.STRING.toString())
              .validator(
                  ConfigDef.ValidString.in(
                      Schema.Type.STRING.toString(),
                      Schema.Type.BYTES.toString()
                  )
              )
              .importance(ConfigDef.Importance.MEDIUM)
              .build()
      ).define(
          ConfigKeyBuilder.of(SCHEMAS_ENABLE_CONFIG, ConfigDef.Type.BOOLEAN)
              .documentation(SCHEMAS_ENABLE_DOC)
              .defaultValue(false)
              .importance(ConfigDef.Importance.MEDIUM)
              .build()
      );
}
 
Example #6
Source File: ToLongConfig.java    From kafka-connect-transform-common with Apache License 2.0 5 votes vote down vote up
public static ConfigDef config() {
  return new ConfigDef()
      .define(
          ConfigKeyBuilder.of(FIELD_CONFIG, ConfigDef.Type.LIST)
              .documentation(FIELD_DOC)
              .defaultValue(Collections.emptyList())
              .importance(ConfigDef.Importance.HIGH)
              .build()
      );
}
 
Example #7
Source File: HeaderToFieldConfig.java    From kafka-connect-transform-common with Apache License 2.0 5 votes vote down vote up
public static ConfigDef config() {
  return new ConfigDef()
      .define(
          ConfigKeyBuilder.of(HEADER_MAPPINGS_CONF, ConfigDef.Type.LIST)
              .documentation(HEADER_MAPPINGS_DOC)
              .importance(ConfigDef.Importance.HIGH)
              .build()
      );
}
 
Example #8
Source File: TopicNameToFieldConfig.java    From kafka-connect-transform-common with Apache License 2.0 5 votes vote down vote up
public static ConfigDef config() {
  return new ConfigDef()
      .define(
          ConfigKeyBuilder.of(FIELD_CONFIG, ConfigDef.Type.STRING)
              .documentation(FIELD_DOC)
              .importance(ConfigDef.Importance.HIGH)
              .build()
      );
}
 
Example #9
Source File: SetMaximumPrecisionConfig.java    From kafka-connect-transform-common with Apache License 2.0 5 votes vote down vote up
public static ConfigDef config() {
  return new ConfigDef()
      .define(
          ConfigKeyBuilder.of(MAX_PRECISION_CONFIG, ConfigDef.Type.INT)
              .documentation(MAX_PRECISION_DOC)
              .importance(ConfigDef.Importance.HIGH)
              .validator(ConfigDef.Range.between(1, 64))
              .build()
      );
}
 
Example #10
Source File: TimestampNowFieldConfig.java    From kafka-connect-transform-common with Apache License 2.0 5 votes vote down vote up
public static ConfigDef config() {
  return new ConfigDef()
      .define(
          ConfigKeyBuilder.of(FIELDS_CONF, ConfigDef.Type.LIST)
              .documentation(FIELDS_DOC)
              .importance(ConfigDef.Importance.HIGH)
              .build()
      );
}
 
Example #11
Source File: TwitterSourceConnectorConfig.java    From kafka-connect-twitter with Apache License 2.0 5 votes vote down vote up
public static ConfigDef conf() {
  return new ConfigDef()
      .define(TWITTER_DEBUG_CONF, Type.BOOLEAN, false, Importance.LOW, TWITTER_DEBUG_DOC)
      .define(TWITTER_OAUTH_CONSUMER_KEY_CONF, Type.PASSWORD, Importance.HIGH, TWITTER_OAUTH_CONSUMER_KEY_DOC)
      .define(TWITTER_OAUTH_SECRET_KEY_CONF, Type.PASSWORD, Importance.HIGH, TWITTER_OAUTH_SECRET_KEY_DOC)
      .define(TWITTER_OAUTH_ACCESS_TOKEN_CONF, Type.PASSWORD, Importance.HIGH, TWITTER_OAUTH_ACCESS_TOKEN_DOC)
      .define(TWITTER_OAUTH_ACCESS_TOKEN_SECRET_CONF, Type.PASSWORD, Importance.HIGH, TWITTER_OAUTH_ACCESS_TOKEN_SECRET_DOC)
      .define(FILTER_KEYWORDS_CONF, Type.LIST, Importance.HIGH, FILTER_KEYWORDS_DOC)
      .define(
          ConfigKeyBuilder.of(FILTER_USER_IDS_CONF, Type.LIST)
              .importance(Importance.HIGH)
              .documentation(FILTER_USER_IDS_DOC)
              .defaultValue(Collections.emptyList())
              .validator(USERID_VALIDATOR)
              .build()
      )
      .define(KAFKA_STATUS_TOPIC_CONF, Type.STRING, Importance.HIGH, KAFKA_STATUS_TOPIC_DOC)
      .define(PROCESS_DELETES_CONF, Type.BOOLEAN, Importance.HIGH, PROCESS_DELETES_DOC)
      .define(
          ConfigKeyBuilder.of(QUEUE_EMPTY_MS_CONF, Type.INT)
              .importance(Importance.LOW)
              .documentation(QUEUE_EMPTY_MS_DOC)
              .defaultValue(100)
              .validator(ConfigDef.Range.atLeast(10))
              .build()
      )
      .define(
          ConfigKeyBuilder.of(QUEUE_BATCH_SIZE_CONF, Type.INT)
              .importance(Importance.LOW)
              .documentation(QUEUE_BATCH_SIZE_DOC)
              .defaultValue(100)
              .validator(ConfigDef.Range.atLeast(1))
              .build()
      );
}
 
Example #12
Source File: SolrSinkConnectorConfig.java    From kafka-connect-solr with Apache License 2.0 5 votes vote down vote up
public static ConfigDef config() {
  return new ConfigDef()
      .define(
          ConfigKeyBuilder.of(SOLR_USERNAME_CONFIG, ConfigDef.Type.STRING)
              .defaultValue("")
              .importance(ConfigDef.Importance.HIGH)
              .documentation(SOLR_USERNAME_DOC)
              .group(AUTHENTICATION_GROUP)
              .build()
      )
      .define(
          ConfigKeyBuilder.of(SOLR_PASSWORD_CONFIG, ConfigDef.Type.PASSWORD)
              .defaultValue("")
              .importance(ConfigDef.Importance.HIGH)
              .documentation(SOLR_PASSWORD_DOC)
              .group(AUTHENTICATION_GROUP)
              .build()
      )
      .define(
          ConfigKeyBuilder.of(SOLR_COMMIT_WITHIN_CONFIG, ConfigDef.Type.INT)
              .defaultValue(-1)
              .importance(ConfigDef.Importance.LOW)
              .documentation(SOLR_COMMIT_WITHIN_DOC)
              .group(INDEXING_GROUP)
              .build()
      )
      .define(
          ConfigKeyBuilder.of(SOLR_DELETE_DOCUMENTS_CONFIG, ConfigDef.Type.BOOLEAN)
              .defaultValue(true)
              .importance(ConfigDef.Importance.MEDIUM)
              .documentation(SOLR_DELETE_DOCUMENTS_DOC)
              .group(INDEXING_GROUP)
              .build()
      );
}
 
Example #13
Source File: FromXmlConfig.java    From kafka-connect-transform-xml with Apache License 2.0 5 votes vote down vote up
public static ConfigDef config() {
  SchemaCompiler schemaCompiler = XJC.createSchemaCompiler();
  Options options = schemaCompiler.getOptions();

  return new ConfigDef()
      .define(
          ConfigKeyBuilder.of(SCHEMA_PATH_CONFIG, ConfigDef.Type.LIST)
              .documentation(SCHEMA_PATH_DOC)
              .importance(ConfigDef.Importance.HIGH)
              .validator(new ValidUrl())
              .build()
      ).define(
          ConfigKeyBuilder.of(PACKAGE_CONFIG, ConfigDef.Type.STRING)
              .documentation(PACKAGE_DOC)
              .importance(ConfigDef.Importance.HIGH)
              .defaultValue(FromXmlConfig.class.getPackage().getName() + ".model")
              .build()
      ).define(
          ConfigKeyBuilder.of(XJC_OPTIONS_STRICT_CHECK_CONFIG, ConfigDef.Type.BOOLEAN)
              .documentation(XJC_OPTIONS_STRICT_CHECK_DOC)
              .importance(ConfigDef.Importance.LOW)
              .defaultValue(options.strictCheck)
              .build()
      ).define(
          ConfigKeyBuilder.of(XJC_OPTIONS_AUTOMATIC_NAME_CONFLICT_RESOLUTION_ENABLED_CONFIG, ConfigDef.Type.BOOLEAN)
              .documentation(XJC_OPTIONS_AUTOMATIC_NAME_CONFLICT_RESOLUTION_ENABLED_DOC)
              .importance(ConfigDef.Importance.LOW)
              .defaultValue(options.automaticNameConflictResolution)
              .build()
      ).define(
          ConfigKeyBuilder.of(XJC_OPTIONS_VERBOSE_CONFIG, ConfigDef.Type.BOOLEAN)
              .documentation(XJC_OPTIONS_VERBOSE_DOC)
              .importance(ConfigDef.Importance.LOW)
              .defaultValue(options.verbose)
              .build()
      );
}
 
Example #14
Source File: MySinkConnectorConfig.java    From kafka-connect-archtype with Apache License 2.0 5 votes vote down vote up
public static ConfigDef config() {
  return new ConfigDef()
      .define(
          ConfigKeyBuilder.of(MY_SETTING_CONFIG, Type.STRING)
              .documentation(MY_SETTING_DOC)
              .importance(Importance.HIGH)
              .build()
      );
}
 
Example #15
Source File: MySourceConnectorConfig.java    From kafka-connect-archtype with Apache License 2.0 5 votes vote down vote up
public static ConfigDef config() {
  return new ConfigDef()
      .define(
          ConfigKeyBuilder.of(MY_SETTING_CONFIG, Type.STRING)
              .documentation(MY_SETTING_DOC)
              .importance(Importance.HIGH)
              .build()
      );
}
 
Example #16
Source File: MyKeyValueTransformationConfig.java    From kafka-connect-archtype with Apache License 2.0 5 votes vote down vote up
public static ConfigDef config() {
  return new ConfigDef()
      .define(
          ConfigKeyBuilder.of(MY_SETTING_CONFIG, Type.STRING)
              .documentation(MY_SETTING_DOC)
              .importance(Importance.HIGH)
              .build()
      );
}
 
Example #17
Source File: CloudSolrSinkConnectorConfig.java    From kafka-connect-solr with Apache License 2.0 4 votes vote down vote up
public static ConfigDef config() {
  return SolrSinkConnectorConfig.config()
      .define(
          ConfigKeyBuilder.of(ZOOKEEPER_HOSTS_CONFIG, ConfigDef.Type.LIST)
          .importance(ConfigDef.Importance.HIGH)
          .documentation(ZOOKEEPER_HOSTS_DOC)
          .group(CONNECTION_GROUP)
          .build()
      ).define(
          ConfigKeyBuilder.of(ZOOKEEPER_CHROOT_CONFIG, ConfigDef.Type.STRING)
              .importance(ConfigDef.Importance.HIGH)
              .documentation(ZOOKEEPER_CHROOT_DOC)
              .group(CONNECTION_GROUP)
              .defaultValue(null)
              .build()
      ).define(
          ConfigKeyBuilder.of(ZOOKEEPER_CONNECT_TIMEOUT_CONFIG, ConfigDef.Type.INT)
              .importance(ConfigDef.Importance.LOW)
              .documentation(ZOOKEEPER_CONNECT_TIMEOUT_DOC)
              .group(CONNECTION_GROUP)
              .defaultValue(15000)
              .build()
      ).define(
          ConfigKeyBuilder.of(ZOOKEEPER_CLIENT_TIMEOUT_CONFIG, ConfigDef.Type.INT)
              .importance(ConfigDef.Importance.LOW)
              .documentation(ZOOKEEPER_CLIENT_TIMEOUT_DOC)
              .group(CONNECTION_GROUP)
              .defaultValue(45000)
              .build()
      ).define(
          ConfigKeyBuilder.of(ZOOKEEPER_RETRY_EXPIRY_TIME_CONFIG, ConfigDef.Type.INT)
              .importance(ConfigDef.Importance.LOW)
              .documentation(ZOOKEEPER_RETRY_EXPIRY_TIME_DOC)
              .group(CONNECTION_GROUP)
              .defaultValue(3000)
              .build()
      ).define(
           ConfigKeyBuilder.of(SOLR_CONNECT_TIMEOUT_CONFIG, ConfigDef.Type.INT)
               .importance(ConfigDef.Importance.LOW)
               .documentation(SOLR_CONNECT_TIMEOUT_DOC)
               .group(CONNECTION_GROUP)
               .defaultValue(15000)
               .build()
      ).define(
           ConfigKeyBuilder.of(SOLR_SOCKET_TIMEOUT_CONFIG, ConfigDef.Type.INT)
               .importance(ConfigDef.Importance.LOW)
               .documentation(SOLR_SOCKET_TIMEOUT_DOC)
               .group(CONNECTION_GROUP)
               .defaultValue(120000)
               .build()
      );
}