elasticsearch 如何为动态索引Elasticsearch配置Kafka Connect API?
大家好,当我使用Kafka Connect API将数据放入Elasticsearch时,我有一个案例。现在我有一个问题。我的配置文件非常简单elasticsearch 如何为动态索引Elasticsearch配置Kafka Connect API?,elasticsearch,apache-kafka,apache-kafka-connect,elasticsearch,Apache Kafka,Apache Kafka Connect,大家好,当我使用Kafka Connect API将数据放入Elasticsearch时,我有一个案例。现在我有一个问题。我的配置文件非常简单 name=elasticsearch-sink connector.class=io.confluent.connect.elasticsearch.ElasticsearchSinkConnector tasks.max=5 topics=myTopicKafka topic.index.map=myTopicKafka:myIndexES-1 sch
name=elasticsearch-sink
connector.class=io.confluent.connect.elasticsearch.ElasticsearchSinkConnector
tasks.max=5
topics=myTopicKafka
topic.index.map=myTopicKafka:myIndexES-1
schema.ignore=true
key.ignore=true
connection.url=http://elasticsearch:9200
type.name=kafka-connect
batch.size=200
#linger.ms=500
但在ES中,我使用策展人来滚动索引
actions:
# 1:
# action: create_index
# description: 'Create mwe.resource.locate index'
# options:
# name: 'myIndexES-1-%Y-%m-%d-1'
2:
action: rollover
description: >-
Rollover the index associated with alias 'myIndexES', after exceeds 500MB memory or is a day old
options:
name: all_myIndexES
conditions:
max_age: 1d
max_size: 500mb
这是每500MB创建一个新索引,但索引名为myIndexES-00002、myIndexES-00003等等。因此,我在这里的问题是如何使用Kafka Connect API支持这一点。当使用时,您应该写入指向单个索引的别名
这意味着,在elasticsearch接收器配置中,您应该改为:
topic.index.map=myTopicKafka:myIndexES-write
在中,您应该有一个带有别名的name属性
options:
name: 'myIndexES-write'
使用时,您应该写入指向单个索引的别名
这意味着,在elasticsearch接收器配置中,您应该改为:
topic.index.map=myTopicKafka:myIndexES-write
在中,您应该有一个带有别名的name属性
options:
name: 'myIndexES-write'
谢谢,但是现在Kafka Connect API在放置索引并使用该索引后,索引性能非常差。谢谢,但是现在Kafka Connect API在放置索引并使用该索引后,索引性能非常差。