使用Elasticsearch-Spark连接器编写在Apache Spark 1.6上运行的应用程序时,(https://www.elastic.co/guide/en/elasticsearch/hadoop/5.0/install.html#_minimalistic_binaries)的文档说使用maven artefact
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch-spark_2.10</artifactId>
<version>5.0.0</version>
</dependency>
然而,maven失败并显示错误消息,指出无法找到指定的artefact。在搜索maven central之后,我发现了另外的版本:
对于Spark 1.3 +
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch-spark-13_2.10</artifactId>
<version>5.0.0</version>
</dependency>
对于Spark 2。*
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch-spark-20_2.10</artifactId>
<version>5.0.0</version>
</dependency>
答案 0 :(得分:0)