简体   繁体   English

使用 scala 和 spark 3.0.1 从 Elasticsearch 读取数据

[英]Read data from Elasticsearch with scala and spark 3.0.1

I'm trying to migrate from Spark-2.4.6 to 3.0.1, but it seems that es-hadoop does not have support for Spark 3.0+.我正在尝试从 Spark-2.4.6 迁移到 3.0.1,但似乎 es-hadoop 不支持 Spark 3.0+。 Do you have any solution?你有什么解决办法吗? Thank you!谢谢!

Unfortunately an ElasticSearch connector that supports Apache Spark 3.0 is not available yet.不幸的是,目前还没有支持 Apache Spark 3.0 的 ElasticSearch 连接器。 a work around can be done as, Spark 3.0.0 relies on Scala 2.12, which is not yet supported by Elasticsearch-hadoop.可以解决一个问题,因为 Spark 3.0.0 依赖于 Elasticsearch-hadoop 尚不支持的 Scala 2.12。 This and a few further issues prevent us using Spark 3.0.0 together with Elasticsearch.这个问题和其他一些问题阻止我们将 Spark 3.0.0 与 Elasticsearch 一起使用。 If you want to compile it yourself, there is a pull-request on elasticsearch-hadoop ( https://github.com/elastic/elasticsearch-hadoop/pull/1308 ) which should at least allow using scala 2.12.如果您想自己编译它,elasticsearch-hadoop 上有一个拉取请求( https://github.com/elastic/elasticsearch-hadoop/pull/1308 ),它至少应该允许使用 scala 2.12。 Not sure if it will fix the other issues as well.不确定它是否也能解决其他问题。

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

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