Elasticsearch 5.0和Elasticsearch-Spark连接器 - 什么是正确的maven artefact

时间:2016-11-04 18:27:53

标签: java elasticsearch-hadoop elasticsearch-spark

使用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>

1 个答案:

答案 0 :(得分:0)

啊,得到了ES人的回答。这是文档中的错误,很快就会修复。 https://github.com/elastic/elasticsearch-hadoop/issues/890#issuecomment-258511400