io.debezium.config.Field.setOf()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(3.0k)|赞(0)|评价(0)|浏览(171)

本文整理了Java中io.debezium.config.Field.setOf()方法的一些代码示例,展示了Field.setOf()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Field.setOf()方法的具体详情如下:
包路径:io.debezium.config.Field
类名称:Field
方法名:setOf

Field.setOf介绍

[英]Create a set of fields.
[中]创建一组字段。

代码示例

代码示例来源:origin: debezium/debezium

@Override
public void configure(Map<String, ?> props) {
  Configuration config = Configuration.from(props);
  final Field.Set configFields = Field.setOf(
      TOPIC_REGEX,
      TOPIC_REPLACEMENT,
      KEY_FIELD_REGEX,
      KEY_FIELD_REPLACEMENT
  );
  if (!config.validateAndRecord(configFields, logger::error)) {
    throw new ConnectException("Unable to validate config.");
  }
  topicRegex = Pattern.compile(config.getString(TOPIC_REGEX));
  topicReplacement = config.getString(TOPIC_REPLACEMENT);
  String keyFieldRegexString = config.getString(KEY_FIELD_REGEX);
  if (keyFieldRegexString != null) {
    keyFieldRegexString = keyFieldRegexString.trim();
  }
  if (keyFieldRegexString != null && !keyFieldRegexString.isEmpty()) {
    keyFieldRegex = Pattern.compile(config.getString(KEY_FIELD_REGEX));
    keyFieldReplacement = config.getString(KEY_FIELD_REPLACEMENT);
  }
  keyFieldName = config.getString(KEY_FIELD_NAME);
}

代码示例来源:origin: debezium/debezium

@Override
public void configure(final Map<String, ?> configs) {
  final Configuration config = Configuration.from(configs);
  final Field.Set configFields = Field.setOf(DROP_TOMBSTONES, DROP_DELETES, HANDLE_DELETES);
  if (!config.validateAndRecord(configFields, logger::error)) {
    throw new ConnectException("Unable to validate config.");

代码示例来源:origin: debezium/debezium

@Override
public void configure(final Map<String, ?> map) {
  final Configuration config = Configuration.from(map);
  final Field.Set configFields = Field.setOf(ARRAY_ENCODING, FLATTEN_STRUCT, DELIMITER, OPERATION_HEADER, HANDLE_DELETES, DROP_TOMBSTONES);

代码示例来源:origin: io.debezium/debezium-core

@Override
public void configure(Map<String, ?> props) {
  Configuration config = Configuration.from(props);
  final Field.Set configFields = Field.setOf(
      TOPIC_REGEX,
      TOPIC_REPLACEMENT,
      KEY_FIELD_REGEX,
      KEY_FIELD_REPLACEMENT
  );
  if (!config.validateAndRecord(configFields, logger::error)) {
    throw new ConnectException("Unable to validate config.");
  }
  topicRegex = Pattern.compile(config.getString(TOPIC_REGEX));
  topicReplacement = config.getString(TOPIC_REPLACEMENT);
  String keyFieldRegexString = config.getString(KEY_FIELD_REGEX);
  if (keyFieldRegexString != null) {
    keyFieldRegexString = keyFieldRegexString.trim();
  }
  if (keyFieldRegexString != null && !keyFieldRegexString.isEmpty()) {
    keyFieldRegex = Pattern.compile(config.getString(KEY_FIELD_REGEX));
    keyFieldReplacement = config.getString(KEY_FIELD_REPLACEMENT);
  }
  keyFieldName = config.getString(KEY_FIELD_NAME);
}

代码示例来源:origin: io.debezium/debezium-core

@Override
public void configure(final Map<String, ?> configs) {
  final Configuration config = Configuration.from(configs);
  final Field.Set configFields = Field.setOf(DROP_TOMBSTONES, DROP_DELETES, HANDLE_DELETES);
  if (!config.validateAndRecord(configFields, logger::error)) {
    throw new ConnectException("Unable to validate config.");

相关文章