public class KafkaOptions extends Object
Modifier and Type | Class and Description |
---|---|
static class |
KafkaOptions.StartupOptions
Kafka startup options.
|
static class |
KafkaOptions.ValueFieldsStrategy
Strategies to derive the data type of a value format by considering a key format.
|
Modifier and Type | Method and Description |
---|---|
static int[] |
createKeyFormatProjection(ReadableConfig options,
DataType physicalDataType)
Creates an array of indices that determine which physical fields of the table schema to
include in the key format and the order that those fields have in the key format.
|
static int[] |
createValueFormatProjection(ReadableConfig options,
DataType physicalDataType)
Creates an array of indices that determine which physical fields of the table schema to
include in the value format.
|
static Optional<FlinkKafkaPartitioner<RowData>> |
getFlinkKafkaPartitioner(ReadableConfig tableOptions,
ClassLoader classLoader)
The partitioner can be either "fixed", "round-robin" or a customized partitioner full class
name.
|
static Properties |
getKafkaProperties(Map<String,String> tableOptions) |
static KafkaSinkSemantic |
getSinkSemantic(ReadableConfig tableOptions) |
static Pattern |
getSourceTopicPattern(ReadableConfig tableOptions) |
static List<String> |
getSourceTopics(ReadableConfig tableOptions) |
static KafkaOptions.StartupOptions |
getStartupOptions(ReadableConfig tableOptions) |
static Map<Integer,Long> |
parseSpecificOffsets(String specificOffsetsStr,
String optionKey)
Parses SpecificOffsets String to Map.
|
static void |
validateSinkTopic(ReadableConfig tableOptions) |
static void |
validateSourceTopic(ReadableConfig tableOptions) |
static void |
validateTableSinkOptions(ReadableConfig tableOptions) |
static void |
validateTableSourceOptions(ReadableConfig tableOptions) |
public static final ConfigOption<String> KEY_FORMAT
public static final ConfigOption<String> VALUE_FORMAT
public static final ConfigOption<List<String>> KEY_FIELDS
public static final ConfigOption<KafkaOptions.ValueFieldsStrategy> VALUE_FIELDS_INCLUDE
public static final ConfigOption<String> KEY_FIELDS_PREFIX
public static final ConfigOption<List<String>> TOPIC
public static final ConfigOption<String> TOPIC_PATTERN
public static final ConfigOption<String> PROPS_BOOTSTRAP_SERVERS
public static final ConfigOption<String> PROPS_GROUP_ID
public static final ConfigOption<String> SCAN_STARTUP_MODE
public static final ConfigOption<String> SCAN_STARTUP_SPECIFIC_OFFSETS
public static final ConfigOption<Long> SCAN_STARTUP_TIMESTAMP_MILLIS
public static final ConfigOption<java.time.Duration> SCAN_TOPIC_PARTITION_DISCOVERY
public static final ConfigOption<String> SINK_PARTITIONER
public static final ConfigOption<String> SINK_SEMANTIC
public static final String SCAN_STARTUP_MODE_VALUE_EARLIEST
public static final String SCAN_STARTUP_MODE_VALUE_LATEST
public static final String SCAN_STARTUP_MODE_VALUE_GROUP_OFFSETS
public static final String SCAN_STARTUP_MODE_VALUE_SPECIFIC_OFFSETS
public static final String SCAN_STARTUP_MODE_VALUE_TIMESTAMP
public static final String SINK_PARTITIONER_VALUE_DEFAULT
public static final String SINK_PARTITIONER_VALUE_FIXED
public static final String SINK_PARTITIONER_VALUE_ROUND_ROBIN
public static final String SINK_SEMANTIC_VALUE_EXACTLY_ONCE
public static final String SINK_SEMANTIC_VALUE_AT_LEAST_ONCE
public static final String SINK_SEMANTIC_VALUE_NONE
public static final String PROPERTIES_PREFIX
public static void validateTableSourceOptions(ReadableConfig tableOptions)
public static void validateTableSinkOptions(ReadableConfig tableOptions)
public static void validateSourceTopic(ReadableConfig tableOptions)
public static void validateSinkTopic(ReadableConfig tableOptions)
public static KafkaSinkSemantic getSinkSemantic(ReadableConfig tableOptions)
public static List<String> getSourceTopics(ReadableConfig tableOptions)
public static Pattern getSourceTopicPattern(ReadableConfig tableOptions)
public static KafkaOptions.StartupOptions getStartupOptions(ReadableConfig tableOptions)
public static Properties getKafkaProperties(Map<String,String> tableOptions)
public static Optional<FlinkKafkaPartitioner<RowData>> getFlinkKafkaPartitioner(ReadableConfig tableOptions, ClassLoader classLoader)
public static Map<Integer,Long> parseSpecificOffsets(String specificOffsetsStr, String optionKey)
SpecificOffsets String format was given as following:
scan.startup.specific-offsets = partition:0,offset:42;partition:1,offset:300
public static int[] createKeyFormatProjection(ReadableConfig options, DataType physicalDataType)
See KEY_FORMAT
, KEY_FIELDS
, and KEY_FIELDS_PREFIX
for more
information.
public static int[] createValueFormatProjection(ReadableConfig options, DataType physicalDataType)
See VALUE_FORMAT
, VALUE_FIELDS_INCLUDE
, and KEY_FIELDS_PREFIX
for more information.
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.