简体   繁体   English

使用Apache Kafka将数据从MSSQL同步到Elasticsearch

[英]Synchronizing data from MSSQL to Elasticsearch using Apache Kafka

I'm currently running a text search in SQL Server, which is becoming a bottleneck and I'd like to move things to Elasticsearch for obvious reasons, however I know that I have to denormalize data for best performance and scalability. 我目前正在SQL Server中运行文本搜索,这已成为一个瓶颈,我想将事情移到Elasticsearch,原因很明显,但我知道我必须对数据进行非规范化以获得最佳性能和可伸缩性。

Currently, my text search includes some aggregation and joining multiple tables to get the final output. 目前,我的文本搜索包括一些聚合和连接多个表以获得最终输出。 Tables, that are joined, aren't that big (up to 20GB per table) but are changed (inserted, updated, deleted) irregularly (two of them once in a week, other one on demand x times a day). 连接的表不是那么大(每个表最多20GB),但是不规则地更改(插入,更新,删除)(其中两个一周一次,另一个按需x次一天)。

My plan would be to use Apache Kafka together with Kafka Connect in order to read CDC from my SQL Server, join this data in Kafka and persist it in Elasticsearch, however I cannot find any material telling me how deletes would be handled when data is being persisted to Elasticsearch. 我的计划是将Apache Kafka与Kafka Connect一起使用,以便从我的SQL Server读取CDC,在Kafka中加入这些数据并将其保存在Elasticsearch中,但是我找不到任何材料告诉我数据处理时如何处理删除坚持到Elasticsearch。

Is this even supported by the default driver? 默认驱动程序是否支持此功能? If not, what are the possibilities? 如果没有,有什么可能性? Apache Spark, Logstash? Apache Spark,Logstash?

I am not sure whether this is already possible in Kafka Connect now, but it seems that this can be resolved with Nifi. 我现在不确定这是否已经可以在Kafka Connect中实现,但似乎可以通过Nifi解决这个问题。

Hopefully I understand the need, here is the documentation for deleting Elasticsearch records with one of the standard NiFi processors: 希望我理解需要,这里是使用标准NiFi处理器之一删除Elasticsearch记录的文档:

https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-elasticsearch-5-nar/1.5.0/org.apache.nifi.processors.elasticsearch.DeleteElasticsearch5/ https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-elasticsearch-5-nar/1.5.0/org.apache.nifi.processors.elasticsearch.DeleteElasticsearch5/

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM