org.apache.kafka.common.config.ConfigDef.Width Java Examples

The following examples show how to use org.apache.kafka.common.config.ConfigDef.Width. 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: ElasticSourceConnectorConfig.java    From kafka-connect-elasticsearch-source with Apache License 2.0 5 votes vote down vote up
private static void addModeOptions(ConfigDef config) {
    int orderInGroup = 0;
    config.define(
            MODE_CONFIG,
            Type.STRING,
            MODE_UNSPECIFIED,
            ConfigDef.ValidString.in(
                    MODE_UNSPECIFIED,
                    MODE_BULK,
                    MODE_TIMESTAMP,
                    MODE_INCREMENTING,
                    MODE_TIMESTAMP_INCREMENTING
            ),
            Importance.HIGH,
            MODE_DOC,
            MODE_GROUP,
            ++orderInGroup,
            Width.MEDIUM,
            MODE_DISPLAY,
            Collections.singletonList(
                    INCREMENTING_FIELD_NAME_CONFIG
            )
    ).define(
            INCREMENTING_FIELD_NAME_CONFIG,
            Type.STRING,
            INCREMENTING_FIELD_NAME_DEFAULT,
            Importance.MEDIUM,
            INCREMENTING_FIELD_NAME_DOC,
            MODE_GROUP,
            ++orderInGroup,
            Width.MEDIUM,
            INCREMENTING_FIELD_NAME_DISPLAY
    );
}
 
Example #2
Source File: ElasticSourceConnectorConfig.java    From kafka-connect-elasticsearch-source with Apache License 2.0 5 votes vote down vote up
private static void addConnectorOptions(ConfigDef config) {
    int orderInGroup = 0;
    config.define(
            POLL_INTERVAL_MS_CONFIG,
            Type.STRING,
            POLL_INTERVAL_MS_DEFAULT,
            Importance.HIGH,
            POLL_INTERVAL_MS_DOC,
            CONNECTOR_GROUP,
            ++orderInGroup,
            Width.SHORT,
            POLL_INTERVAL_MS_DISPLAY
    ).define(
            BATCH_MAX_ROWS_CONFIG,
            Type.STRING,
            BATCH_MAX_ROWS_DEFAULT,
            Importance.LOW,
            BATCH_MAX_ROWS_DOC,
            CONNECTOR_GROUP,
            ++orderInGroup,
            Width.SHORT,
            BATCH_MAX_ROWS_DISPLAY
    ).define(
            TOPIC_PREFIX_CONFIG,
            Type.STRING,
            Importance.HIGH,
            TOPIC_PREFIX_DOC,
            CONNECTOR_GROUP,
            ++orderInGroup,
            Width.MEDIUM,
            TOPIC_PREFIX_DISPLAY
    );
}
 
Example #3
Source File: ZeebeClientConfigDef.java    From kafka-connect-zeebe with Apache License 2.0 5 votes vote down vote up
public static void defineClientGroup(final ConfigDef definitions) {
  int order = 0;

  definitions
      .define(
          BROKER_CONTACTPOINT_CONFIG,
          Type.STRING,
          BROKER_CONTACTPOINT_DEFAULT,
          Importance.HIGH,
          BROKER_CONTACTPOINT_DOC,
          CLIENT_CONFIG_GROUP,
          ++order,
          Width.SHORT,
          "Broker contact point")
      .define(
          REQUEST_TIMEOUT_CONFIG,
          Type.LONG,
          REQUEST_TIMEOUT_DEFAULT,
          Importance.LOW,
          REQUEST_TIMEOUT_DOC,
          CLIENT_CONFIG_GROUP,
          ++order,
          Width.SHORT,
          "Request timeout")
      .define(
          USE_PLAINTEXT_CONFIG,
          Type.BOOLEAN,
          USE_PLAINTEXT_DEFAULT,
          Importance.LOW,
          USE_PLAINTEXT_DOC,
          CLIENT_CONFIG_GROUP,
          ++order,
          Width.SHORT,
          "Use plaintext connection");
}
 
Example #4
Source File: ElasticSourceConnectorConfig.java    From kafka-connect-elasticsearch-source with Apache License 2.0 4 votes vote down vote up
private static void addDatabaseOptions(ConfigDef config) {
    int orderInGroup = 0;
    config.define(
            ES_HOST_CONF,
            Type.STRING,
            Importance.HIGH,
            ES_HOST_DOC,
            DATABASE_GROUP,
            ++orderInGroup,
            Width.LONG,
            ES_HOST_DISPLAY,
            Collections.singletonList(INDEX_PREFIX_CONFIG)
    ).define(
            ES_PORT_CONF,
            Type.STRING,
            Importance.HIGH,
            ES_PORT_DOC,
            DATABASE_GROUP,
            ++orderInGroup,
            Width.LONG,
            ES_PORT_DISPLAY,
            Collections.singletonList(INDEX_PREFIX_CONFIG)
    ).define(
            ES_USER_CONF,
            Type.STRING,
            null,
            Importance.HIGH,
            ES_USER_DOC,
            DATABASE_GROUP,
            ++orderInGroup,
            Width.LONG,
            ES_USER_DISPLAY
    ).define(
            ES_PWD_CONF,
            Type.STRING,
            null,
            Importance.HIGH,
            ES_PWD_DOC,
            DATABASE_GROUP,
            ++orderInGroup,
            Width.SHORT,
            ES_PWD_DISPLAY
    ).define(
            CONNECTION_ATTEMPTS_CONFIG,
            Type.STRING,
            CONNECTION_ATTEMPTS_DEFAULT,
            Importance.LOW,
            CONNECTION_ATTEMPTS_DOC,
            DATABASE_GROUP,
            ++orderInGroup,
            ConfigDef.Width.SHORT,
            CONNECTION_ATTEMPTS_DISPLAY
    ).define(
            CONNECTION_BACKOFF_CONFIG,
            Type.STRING,
            CONNECTION_BACKOFF_DEFAULT,
            Importance.LOW,
            CONNECTION_BACKOFF_DOC,
            DATABASE_GROUP,
            ++orderInGroup,
            Width.SHORT,
            CONNECTION_BACKOFF_DISPLAY
    ).define(
            INDEX_PREFIX_CONFIG,
            Type.STRING,
            INDEX_PREFIX_DEFAULT,
            Importance.MEDIUM,
            INDEX_PREFIX_DOC,
            DATABASE_GROUP,
            ++orderInGroup,
            Width.LONG,
            INDEX_PREFIX_DISPLAY
    );
}
 
Example #5
Source File: ZeebeSinkConnectorConfig.java    From kafka-connect-zeebe with Apache License 2.0 4 votes vote down vote up
private static void defineMessageGroup(final ConfigDef definitions) {
  int order = 0;

  definitions
      .define(
          MESSAGE_PATH_NAME_CONFIG,
          Type.STRING,
          MESSAGE_PATH_NAME_DEFAULT,
          Importance.HIGH,
          MESSAGE_PATH_NAME_DOC,
          MESSAGE_CONFIG_GROUP,
          ++order,
          Width.SHORT,
          "Message name jsonpath query")
      .define(
          MESSAGE_PATH_KEY_CONFIG,
          Type.STRING,
          MESSAGE_PATH_KEY_DEFAULT,
          Importance.HIGH,
          MESSAGE_PATH_KEY_DOC,
          MESSAGE_CONFIG_GROUP,
          ++order,
          Width.SHORT,
          "Correlation key jsonpath query")
      .define(
          MESSAGE_PATH_VARIABLES_CONFIG,
          Type.STRING,
          MESSAGE_PATH_VARIABLES_DEFAULT,
          Importance.MEDIUM,
          MESSAGE_PATH_VARIABLES_DOC,
          MESSAGE_CONFIG_GROUP,
          ++order,
          Width.SHORT,
          "Message variables jsonpath query")
      .define(
          MESSAGE_PATH_TTL_CONFIG,
          Type.STRING,
          MESSAGE_PATH_TTL_DEFAULT,
          Importance.LOW,
          MESSAGE_PATH_TTL_DOC,
          MESSAGE_CONFIG_GROUP,
          ++order,
          Width.SHORT,
          "Message TTL jsonpath query");
}
 
Example #6
Source File: ZeebeSourceConnectorConfig.java    From kafka-connect-zeebe with Apache License 2.0 4 votes vote down vote up
private static void defineWorkerGroup(final ConfigDef definitions) {
  int order = 0;

  definitions
      .define(
          WORKER_NAME_CONFIG,
          Type.STRING,
          WORKER_NAME_DEFAULT,
          Importance.LOW,
          WORKER_NAME_DOC,
          WORKER_CONFIG_GROUP,
          ++order,
          Width.SHORT,
          "Name")
      .define(
          MAX_JOBS_TO_ACTIVATE_CONFIG,
          Type.INT,
          MAX_JOBS_TO_ACTIVATE_DEFAULT,
          Importance.MEDIUM,
          MAX_JOBS_TO_ACTIVATE_DOC,
          WORKER_CONFIG_GROUP,
          ++order,
          Width.SHORT,
          "Max jobs to activate")
      .define(
          JOB_TIMEOUT_CONFIG,
          Type.LONG,
          JOB_TIMEOUT_DEFAULT,
          Importance.MEDIUM,
          JOB_TIMEOUT_DOC,
          WORKER_CONFIG_GROUP,
          ++order,
          Width.SHORT,
          "Job timeout")
      .define(
          JOB_TYPES_CONFIG,
          Type.LIST,
          JOB_TYPES_DEFAULT,
          Importance.HIGH,
          JOB_TYPES_DOC,
          WORKER_CONFIG_GROUP,
          ++order,
          Width.LONG,
          "Job types")
      .define(
          JOB_HEADER_TOPICS_CONFIG,
          Type.STRING,
          JOB_HEADER_TOPICS_DEFAULT,
          Importance.HIGH,
          JOB_HEADER_TOPICS_DOC,
          WORKER_CONFIG_GROUP,
          ++order,
          Width.SHORT,
          "Job topics header")
      .define(
          JOB_VARIABLES_CONFIG,
          Type.LIST,
          JOB_VARIABLES_DEFAULT,
          Importance.LOW,
          JOB_VARIABLES_DOC,
          WORKER_CONFIG_GROUP,
          ++order,
          Width.SHORT,
          "Job variables");
}