简体   繁体   English

如何使用 Kafka 连接 s3 接收器连接器标记 S3 存储桶对象

[英]How to tag S3 bucket objects using Kafka connect s3 sink connector

Is there any way we can tag the objects written in S3 buckets through the Kafka Connect S3 sink connector.有什么方法可以通过 Kafka Connect S3 sink 连接器标记写入 S3 存储桶中的对象。 I am reading messages from Kafka and writing the avro files in S3 bucket using S3 sink connector.我正在读取来自 Kafka 的消息并使用 S3 接收器连接器在 S3 存储桶中写入 avro 文件。 When the files are written in S3 bucket I need to tag the files.当文件写入 S3 存储桶时,我需要标记文件。

there is an API inside source code on the GitHub called addTags(), but it's now private and is not exposed to the connector client except this small config feature called S3_OBJECT_TAGGING_CONFIG which allows you to add start/end offsets as well as record count to s3 object. GitHub 上的源代码中有一个名为 addTags() 的 API,但它现在是私有的,除了这个名为S3_OBJECT_TAGGING_CONFIG 的小配置功能外,它不会暴露给连接器客户端,它允许您向 s3 添加开始/结束偏移量以及记录计数目的。

 configDef.define(
      S3_OBJECT_TAGGING_CONFIG,
      Type.BOOLEAN,
      S3_OBJECT_TAGGING_DEFAULT,
      Importance.LOW,
      "Tag S3 objects with start and end offsets, as well as record count.",
      group,
      ++orderInGroup,
      Width.LONG,
      "S3 Object Tagging"
  );

If you want to add other/custom tags then answer is NO you cannot do it right now.如果您想添加其他/自定义标签,那么答案是否定的,您现在不能这样做。

Useful feature would be to take the tags from the predefined part of an input document in Kafka but this is not available right now.有用的功能是从 Kafka 中输入文档的预定义部分获取标签,但现在不可用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Confluent 的 S3 Sink Connector for Kafka Connect 能否使用“topics.dir”将主题写入 S3 存储桶中的嵌套(不是顶级)文件夹? - Can Confluent's S3 Sink Connector for Kafka Connect write topics to a nested (not a top-level) folder in an S3 bucket using `topics.dir`? Kafka Connect S3 sink 连接器与自定义 Partitioner 奇怪行为 - Kafka Connect S3 sink connector with custom Partitioner strange behavior Kafka Connect 的 S3 源连接器无法读取存储桶内容 - S3 source connector for Kafka Connect unable to read bucket content 使用kafka connect s3 sink中的密钥进行分区 - Partitioning with key in kafka connect s3 sink Kafka 连接 s3 sink 多个分区 - Kafka connect s3 sink multiple partitions Kafka Connect S3 Sink 添加元数据 - Kafka Connect S3 Sink add MetaData 如何使用 Kafka S3 Sink Connector 的 FieldPartitioner 创建分区 - How to create partition using FieldPartitioner from Kafka S3 Sink Connector 如何使用其字段和基于时间的分区为 json 配置 kafka s3 接收器连接器? - How to configure kafka s3 sink connector for json using its fields AND time based partitioning? 如何正确重启kafka s3接收器连接? - How to properly restart a kafka s3 sink connect? S3 接收器连接器未在存储桶中创建密钥或 header 文件 - S3 Sink Connector not creating key or header files within bucket
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM