# \[Hadoop\] include classpath with spark shell

**URL:** <https://discuss.elastic.co/t/hadoop-include-classpath-with-spark-shell/20307>\
**Category:** Elasticsearch\
**Created:** [October 17, 2014, 3:20pm UTC](https://discuss.elastic.co/t/hadoop-include-classpath-with-spark-shell/20307 "2014-10-17T15:20:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeff\_Steinmetz](https://avatars.discourse-cdn.com/v4/letter/j/ecd19e/32.png) [@Jeff\_Steinmetz](https://discuss.elastic.co/u/Jeff_Steinmetz)\
**Post date:** [October 17, 2014, 3:20pm UTC](https://discuss.elastic.co/t/hadoop-include-classpath-with-spark-shell/20307/1 "2014-10-17T15:20:45Z")

</div>

What is the best way to include a class path that points to a JAR file when  
using the spark shell (specifically when running spark shell from the  
master of a multi slave master/slave cluster)?  
Or more specifically, the elasticsearch-hadoop jar

compiled jar download:  
[http://www.elasticsearch.org/overview/hadoop/download/](http://www.elasticsearch.org/overview/hadoop/download/)

more info:  
[http://www.elasticsearch.org/guide/en/elasticsearch/hadoop/current/spark.html](http://www.elasticsearch.org/guide/en/elasticsearch/hadoop/current/spark.html)

elasticsearch-hadoop needs to be available in Spark’s classpath. As Spark  
has multiple deployment modes, this can translate to the target classpath,  
whether it is on only one node (as is the case with the local mode - which  
will be used through-out the documentation) or per-node depending on the  
desired infrastructure.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/b3cbb994-eb52-4a76-840f-fbeadc8e0682%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b3cbb994-eb52-4a76-840f-fbeadc8e0682%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Jeff\_Steinmetz](https://avatars.discourse-cdn.com/v4/letter/j/ecd19e/32.png) [@Jeff\_Steinmetz](https://discuss.elastic.co/u/Jeff_Steinmetz)\
**Post date:** [October 17, 2014, 4:25pm UTC](https://discuss.elastic.co/t/hadoop-include-classpath-with-spark-shell/20307/2 "2014-10-17T16:25:04Z")

</div>

Also - does the elasticsearch-hadoop JAR need to be on all slave nodes too?

On Friday, October 17, 2014 8:20:46 AM UTC-7, Jeff Steinmetz wrote:

> What is the best way to include a class path that points to a JAR file  
> when using the spark shell (specifically when running spark shell from the  
> master of a multi slave master/slave cluster)?  
> Or more specifically, the elasticsearch-hadoop jar
> 
> compiled jar download:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/overview/hadoop/download/)
> 
> more info:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/hadoop/current/spark.html)
> 
> elasticsearch-hadoop needs to be available in Spark’s classpath. As Spark  
> has multiple deployment modes, this can translate to the target classpath,  
> whether it is on only one node (as is the case with the local mode - which  
> will be used through-out the documentation) or per-node depending on the  
> desired infrastructure.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/f4c15d56-d8fb-4da6-a361-3a729baf7040%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f4c15d56-d8fb-4da6-a361-3a729baf7040%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 12:55am UTC](https://discuss.elastic.co/t/hadoop-include-classpath-with-spark-shell/20307/3 "2017-07-06T00:55:27Z")

</div>


