【发布时间】:2014-10-03 23:51:29
【问题描述】:
我正在尝试使用 spark-submit 通过命令行启动使用 Elastic Search 输入的 Spark 作业,如 http://www.elasticsearch.org/guide/en/elasticsearch/hadoop/current/spark.html 中所述
我在一个文件中设置属性,但是在启动 spark-submit 时它会给出以下警告:
~/spark-1.0.1-bin-hadoop1/bin/spark-submit --class Main --properties-file spark.conf SparkES.jar
Warning: Ignoring non-spark config property: es.resource=myresource
Warning: Ignoring non-spark config property: es.nodes=mynode
Warning: Ignoring non-spark config property: es.query=myquery
...
Exception in thread "main" org.elasticsearch.hadoop.rest.EsHadoopNoNodesLeftException: Connection error (check network and/or proxy settings)- all nodes failed
我的配置文件看起来像(具有正确的值):
es.nodes nodeip:port
es.resource index/type
es.query query
在代码中的 Configuration 对象中设置属性是可行的,但我需要避免这种变通方法。
有没有办法通过命令行设置这些属性?
【问题讨论】:
-
您可以将您的 spark.conf 文件添加到问题中吗?
标签: elasticsearch apache-spark