|
| 1 | +/* |
| 2 | + * Copyright 2022-2023 Bytedance Ltd. and/or its affiliates. |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + */ |
| 16 | + |
| 17 | +package com.bytedance.bitsail.connector.kafka.constants; |
| 18 | + |
| 19 | +public class KafkaConstants { |
| 20 | + public static final String CONNECTOR_TYPE_VALUE_KAFKA = "kafka"; |
| 21 | + public static final String CONNECTOR_TYPE_VALUE_KAFKA010X = "kafka010x"; |
| 22 | + public static final String CONNECTOR_TYPE_VALUE_KAFKA220 = "kafka220"; |
| 23 | + public static final String CONNECTOR_NAME_VALUE_KAFKA_SOURCE = "kafka_source"; |
| 24 | + public static final String CONNECTOR_NAME_VALUE_KAFKA_SINK = "kafka-sink"; |
| 25 | + public static final String CONNECTOR_VERSION_VALUE_08 = "0.8"; |
| 26 | + public static final String CONNECTOR_VERSION_VALUE_09 = "0.9"; |
| 27 | + public static final String CONNECTOR_VERSION_VALUE_010 = "0.10"; |
| 28 | + public static final String CONNECTOR_VERSION_VALUE_011 = "0.11"; |
| 29 | + public static final String CONNECTOR_VERSION_VALUE_UNIVERSAL = "universal"; |
| 30 | + public static final String CONNECTOR_TOPIC = "connector.topic"; |
| 31 | + public static final String CONNECTOR_CLUSTER = "connector.cluster"; |
| 32 | + public static final String CONNECTOR_SERVERS = "connector.bootstrap.servers"; |
| 33 | + public static final String CONNECTOR_TEAM = "connector.team"; |
| 34 | + public static final String CONNECTOR_PSM = "connector.psm"; |
| 35 | + public static final String CONNECTOR_OWNER = "connector.owner"; |
| 36 | + public static final String CONNECTOR_GROUP_ID = "connector.group.id"; |
| 37 | + public static final String CONNECTOR_SOURCE_INDEX = "connector.source.index"; |
| 38 | + public static final String CONNECTOR_LOCAL_MODE = "connector.local-mode"; |
| 39 | + public static final String CONNECTOR_STARTUP_MODE = "connector.startup-mode"; |
| 40 | + public static final String CONNECTOR_STARTUP_MODE_VALUE_EARLIEST = "earliest-offset"; |
| 41 | + public static final String CONNECTOR_STARTUP_MODE_VALUE_LATEST = "latest-offset"; |
| 42 | + public static final String CONNECTOR_STARTUP_MODE_VALUE_GROUP_OFFSETS = "group-offsets"; |
| 43 | + public static final String CONNECTOR_STARTUP_MODE_VALUE_SPECIFIC_OFFSETS = "specific-offsets"; |
| 44 | + public static final String CONNECTOR_STARTUP_MODE_VALUE_SPECIFIC_TIMESTAMP = "specific-timestamp"; |
| 45 | + public static final String CONNECTOR_SPECIFIC_OFFSETS = "connector.specific-offsets"; |
| 46 | + public static final String CONNECTOR_SPECIFIC_OFFSETS_PARTITION = "partition"; |
| 47 | + public static final String CONNECTOR_SPECIFIC_OFFSETS_OFFSET = "offset"; |
| 48 | + public static final String CONNECTOR_SPECIFIC_TIMESTAMP = "connector.specific-timestamp"; |
| 49 | + public static final String CONNECTOR_RELATIVE_OFFSET = "connector.relative-offset"; |
| 50 | + public static final String CONNECTOR_RESET_TO_EARLIEST_FOR_NEW_PARTITION = |
| 51 | + "connector.reset-to-earliest-for-new-partition"; |
| 52 | + public static final String CONNECTOR_KAFKA_PROPERTIES = "connector.kafka.properties"; |
| 53 | + public static final String CONNECTOR_KAFKA_PROPERTIES_PARTITIONER_CLASS = |
| 54 | + "connector.kafka.properties.partitioner.class"; |
| 55 | + public static final String CONNECTOR_PROPERTIES = "connector.properties"; |
| 56 | + public static final String CONNECTOR_PROPERTIES_KEY = "key"; |
| 57 | + public static final String CONNECTOR_PROPERTIES_VALUE = "value"; |
| 58 | + public static final String CONNECTOR_SECURITY_PROTOCOL = "connector.security-protocol"; |
| 59 | + public static final String CONNECTOR_SASL_MECHANISM = "connector.sasl_mechanism"; |
| 60 | + public static final String CONNECTOR_SASL_PLAIN_USERNAME = "connector.sasl-plain-username"; |
| 61 | + public static final String CONNECTOR_SASL_PLAIN_PASSWORD = "connector.sasl-plain-password"; |
| 62 | + public static final String CONNECTOR_SSL_TRUSTSTORE_LOCATION = "connector.ssl_truststore_location"; |
| 63 | + public static final String CONNECTOR_SSL_TRUSTSTORE_PASSWORD = "connector.ssl_truststore_password"; |
| 64 | + public static final String CONNECTOR_SSL_IDENTIFICATION_ALGORITHM = "connector.ssl_endpoint_identification_algorithm"; |
| 65 | + public static final String CONNECTOR_SINK_SEMANTIC = "connector.sink-semantic"; |
| 66 | + public static final String CONNECTOR_SINK_PARTITIONER = "connector.sink-partitioner"; |
| 67 | + public static final String CONNECTOR_SINK_PARTITIONER_VALUE_FIXED = "fixed"; |
| 68 | + public static final String CONNECTOR_SINK_PARTITIONER_VALUE_ROUND_ROBIN = "round-robin"; |
| 69 | + public static final String CONNECTOR_SINK_PARTITIONER_VALUE_ROW_FIELDS_HASH = "row-fields-hash"; |
| 70 | + public static final String CONNECTOR_SINK_PARTITIONER_VALUE_CUSTOM = "custom"; |
| 71 | + public static final String CONNECTOR_SINK_PARTITIONER_CLASS = "connector.sink-partitioner-class"; |
| 72 | + public static final String CONNECTOR_SINK_IGNORE_TRANSACTION_TIMEOUT = |
| 73 | + "connector.sink-ignore-transaction-timeout-error"; |
| 74 | + |
| 75 | + // Rate limiting configurations |
| 76 | + public static final String CONNECTOR_RATE_LIMITING_NUM = "connector.rate-limiting-num"; |
| 77 | + public static final String CONNECTOR_RATE_LIMITING_UNIT = "connector.rate-limiting-unit"; |
| 78 | + |
| 79 | + // Partition range to consume |
| 80 | + public static final String CONNECTOR_SOURCE_PARTITION_RANGE = "connector.source-partition-range"; |
| 81 | + |
| 82 | + // Source sampling |
| 83 | + public static final String CONNECTOR_SOURCE_SAMPLE_INTERVAL = "connector.source-sample-interval"; |
| 84 | + public static final String CONNECTOR_SOURCE_SAMPLE_NUM = "connector.source-sample-num"; |
| 85 | + |
| 86 | + // Disable currentOffsetsRate metrics |
| 87 | + public static final String DISABLE_CURRENT_OFFSET_RATE_METRICS = "disableCurrentOffsetsRateMetrics"; |
| 88 | + public static final int MAX_PARALLELISM = 5; |
| 89 | + public static final int REQUEST_TIMEOUT_MS_CONFIG = 1200 * 1000; |
| 90 | +} |
0 commit comments