[英]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.