# Hadoop to ES problem

**URL:** <https://discuss.elastic.co/t/hadoop-to-es-problem/15584>\
**Category:** Elasticsearch\
**Created:** [February 4, 2014, 10:01am UTC](https://discuss.elastic.co/t/hadoop-to-es-problem/15584 "2014-02-04T10:01:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![philg](https://avatars.discourse-cdn.com/v4/letter/p/a88e57/32.png) [@philg](https://discuss.elastic.co/u/philg)\
**Post date:** [February 4, 2014, 10:01am UTC](https://discuss.elastic.co/t/hadoop-to-es-problem/15584/1 "2014-02-04T10:01:25Z")

</div>

hello my context:  
ES 0.90.3, elasticsearch-hadoop-1.3.0.M1 , eclipse- java  
i am experimenting ES-\>Hadoop and Hadoop-\>ES  
no problem with Hadoop2ES with these 3 settings ( i see the index + data  
through head plugin, perfect)  
job.set("es.resource", "eshindex2/eshlog2");  
job.set("es.host", "localhost");  
job.set("es.port", "9200");  
but experimenting the inverse , ie ES 2 Hadoop  
....  
configuration.set("es.query", "eshindex2/eshlog2/\_search?q=\*");  
configuration.set("es.host", "localhost");  
configuration.set("es.port", "9200");  
System.out.println("conf:"+ configuration);  
JobConf job = new JobConf(configuration,  
SimpleJobES2Hadoop.class);  
...................  
i got the error  
10:58:27 INFO mapred.JobClient: Cleaning up the staging area  
file:/tmp/hadoop-xxx/mapred/staging/xxx-1302405475/.staging/job\_local\_0001  
Exception in thread "main" java.lang.NullPointerException  
at org.elasticsearch.hadoop.rest.dto.Node.(Node.java:30)  
at  
org.elasticsearch.hadoop.rest.RestClient.getNodes(RestClient.java:139)

Any idea?  
bestsregards  
philippe

--  
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/2a52b4e7-3ecd-491b-8c6e-1d8d521260ef%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2a52b4e7-3ecd-491b-8c6e-1d8d521260ef%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![costin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/costin/32/44950_2.png) [@costin](https://discuss.elastic.co/u/costin)\
**Post date:** [February 4, 2014, 10:07am UTC](https://discuss.elastic.co/t/hadoop-to-es-problem/15584/2 "2014-02-04T10:07:37Z")

</div>

If you are using M1 you should use es.resource instead of es.query in your latest example.  
es.query is supported in the upcoming 1.3.0.M2 (not in m1).

On 04/02/2014 12:01 PM, Phil gib wrote:

> hello my context:  
> ES 0.90.3, elasticsearch-hadoop-1.3.0.M1 , eclipse- java  
> i am experimenting ES-\>Hadoop and Hadoop-\>ES  
> no problem with Hadoop2ES with these 3 settings ( i see the index + data through head plugin, perfect)  
> job.set("es.resource", "eshindex2/eshlog2");  
> job.set("es.host", "localhost");  
> job.set("es.port", "9200");  
> but experimenting the inverse , ie ES 2 Hadoop  
> ....  
> configuration.set("es.query", "eshindex2/eshlog2/\_search?q=\*");  
> configuration.set("es.host", "localhost");  
> configuration.set("es.port", "9200");  
> System.out.println("conf:"+ configuration);  
> JobConf job = new JobConf(configuration, SimpleJobES2Hadoop.class);  
> ...................  
> i got the error  
> 10:58:27 INFO mapred.JobClient: Cleaning up the staging area  
> file:/tmp/hadoop-xxx/mapred/staging/xxx-1302405475/.staging/job\_local\_0001  
> Exception in thread "main" java.lang.NullPointerException  
> at org.elasticsearch.hadoop.rest.dto.Node.(Node.java:30)  
> at org.elasticsearch.hadoop.rest.RestClient.getNodes(RestClient.java:139)
> 
> Any idea?  
> bestsregards  
> philippe
> 
> --  
> 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/2a52b4e7-3ecd-491b-8c6e-1d8d521260ef%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2a52b4e7-3ecd-491b-8c6e-1d8d521260ef%40googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
Costin

--  
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/52F0BBE9.5040406%40gmail.com](https://groups.google.com/d/msgid/elasticsearch/52F0BBE9.5040406%40gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![philg](https://avatars.discourse-cdn.com/v4/letter/p/a88e57/32.png) [@philg](https://discuss.elastic.co/u/philg)\
**Post date:** [February 4, 2014, 10:59am UTC](https://discuss.elastic.co/t/hadoop-to-es-problem/15584/3 "2014-02-04T10:59:07Z")

</div>

Hello Costin,  
changing to "es.resource" does not help... ☹  
argh.. i see the socket connection closed in the ES logs.. so ES is  
contacted ... the 9200 is correct ?

philippe  
best regards

```
configuration.set("es.resource", "eshindex2/eshlog2/_search?q=*");
    configuration.set("es.host", "localhost");
    configuration.set("es.port", "9200");
    System.out.println("conf:"+ configuration);
    JobConf job = new JobConf(configuration, 

```

SimpleJobES2Hadoop.class);  
...................

On Tuesday, February 4, 2014 11:07:37 AM UTC+1, Costin Leau wrote:

> If you are using M1 you should use es.resource instead of es.query in your  
> latest example.  
> es.query is supported in the upcoming 1.3.0.M2 (not in m1).
> 
> On 04/02/2014 12:01 PM, Phil gib wrote:
> 
> > hello my context:  
> > ES 0.90.3, elasticsearch-hadoop-1.3.0.M1 , eclipse- java  
> > i am experimenting ES-\>Hadoop and Hadoop-\>ES  
> > no problem with Hadoop2ES with these 3 settings ( i see the index +  
> > data through head plugin, perfect)  
> > job.set("es.resource", "eshindex2/eshlog2");  
> > job.set("es.host", "localhost");  
> > job.set("es.port", "9200");  
> > but experimenting the inverse , ie ES 2 Hadoop  
> > ....  
> > configuration.set("es.query", "eshindex2/eshlog2/\_search?q=\*");  
> > configuration.set("es.host", "localhost");  
> > configuration.set("es.port", "9200");  
> > System.out.println("conf:"+ configuration);  
> > JobConf job = new JobConf(configuration,  
> > SimpleJobES2Hadoop.class);  
> > ...................  
> > i got the error  
> > 10:58:27 INFO mapred.JobClient: Cleaning up the staging area
> 
> file:/tmp/hadoop-xxx/mapred/staging/xxx-1302405475/.staging/job\_local\_0001
> 
> > Exception in thread "main" java.lang.NullPointerException  
> > at org.elasticsearch.hadoop.rest.dto.Node.(Node.java:30)  
> > at  
> > org.elasticsearch.hadoop.rest.RestClient.getNodes(RestClient.java:139)
> > 
> > Any idea?  
> > bestsregards  
> > philippe
> > 
> > --  
> > 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  
> > [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit
> 
> [https://groups.google.com/d/msgid/elasticsearch/2a52b4e7-3ecd-491b-8c6e-1d8d521260ef%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2a52b4e7-3ecd-491b-8c6e-1d8d521260ef%40googlegroups.com).
> 
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> Costin

--  
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/1353d6b0-830e-4881-b10d-533639227a1c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/1353d6b0-830e-4881-b10d-533639227a1c%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![costin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/costin/32/44950_2.png) [@costin](https://discuss.elastic.co/u/costin)\
**Post date:** [February 4, 2014, 11:22am UTC](https://discuss.elastic.co/t/hadoop-to-es-problem/15584/4 "2014-02-04T11:22:54Z")

</div>

The port and host are 9200 and localhost by default. What's your ES version?  
ES-Hadoop requires 0.90 or higher (preferably the latest 0.90).

On 04/02/2014 12:59 PM, Phil gib wrote:

> ```
> Hello Costin,
> 
> ```
> 
> changing to "es.resource" does not help... ☹  
> argh.. i see the socket connection closed in the ES logs.. so ES is contacted ... the 9200 is correct ?
> 
> philippe  
> best regards
> 
> ```
> configuration.set("es.resource", "eshindex2/eshlog2/_search?q=*");
> configuration.set("es.host", "localhost");
> configuration.set("es.port", "9200");
> System.out.println("conf:"+ configuration);
> JobConf job = new JobConf(configuration, SimpleJobES2Hadoop.class);
> 
> ```
> 
> ...................
> 
> On Tuesday, February 4, 2014 11:07:37 AM UTC+1, Costin Leau wrote:
> 
> ```
> If you are using M1 you should use es.resource instead of es.query in your latest example.
> es.query is supported in the upcoming 1.3.0.M2 (not in m1).
> 
> On 04/02/2014 12:01 PM, Phil gib wrote:
> > hello my context:
> > ES 0.90.3, elasticsearch-hadoop-1.3.0.M1 , eclipse- java
> > i am experimenting ES->Hadoop and Hadoop->ES
> > no problem with Hadoop2ES with these 3 settings ( i see the index + data through head plugin, perfect)
> > job.set("es.resource", "eshindex2/eshlog2");
> > job.set("es.host", "localhost");
> > job.set("es.port", "9200");
> > but experimenting the inverse , ie ES 2 Hadoop
> > ....
> > configuration.set("es.query", "eshindex2/eshlog2/_search?q=*");
> > configuration.set("es.host", "localhost");
> > configuration.set("es.port", "9200");
> > System.out.println("conf:"+ configuration);
> > JobConf job = new JobConf(configuration, SimpleJobES2Hadoop.class);
> > ...................
> > i got the error
> > 10:58:27 INFO mapred.JobClient: Cleaning up the staging area
> > file:/tmp/hadoop-xxx/mapred/staging/xxx-1302405475/.staging/job_local_0001
> > Exception in thread "main" java.lang.NullPointerException
> > at org.elasticsearch.hadoop.rest.dto.Node.<init>(Node.java:30)
> > at org.elasticsearch.hadoop.rest.RestClient.getNodes(RestClient.java:139)
> >
> >
> > Any idea?
> > bestsregards
> > philippe
> >
> > --
> > 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
> >elasticsearc...@googlegroups.com <javascript:>.
> > To view this discussion on the web visit
> >https://groups.google.com/d/msgid/elasticsearch/2a52b4e7-3ecd-491b-8c6e-1d8d521260ef%40googlegroups.com
> <https://groups.google.com/d/msgid/elasticsearch/2a52b4e7-3ecd-491b-8c6e-1d8d521260ef%40googlegroups.com>.
> > For more options, visithttps://groups.google.com/groups/opt_out <https://groups.google.com/groups/opt_out>.
> 
> --
> Costin
> 
> ```
> 
> --  
> 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/1353d6b0-830e-4881-b10d-533639227a1c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/1353d6b0-830e-4881-b10d-533639227a1c%40googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
Costin

--  
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/52F0CD8E.30100%40gmail.com](https://groups.google.com/d/msgid/elasticsearch/52F0CD8E.30100%40gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![philg](https://avatars.discourse-cdn.com/v4/letter/p/a88e57/32.png) [@philg](https://discuss.elastic.co/u/philg)\
**Post date:** [February 4, 2014, 12:01pm UTC](https://discuss.elastic.co/t/hadoop-to-es-problem/15584/5 "2014-02-04T12:01:54Z")

</div>

Thnaks for your reply,  
my SW context is:  
ES 0.90.3, elasticsearch-hadoop-1.3.0.M1 , eclipse- java, windows7

(perharps some configuration problem in Eclipse , i will investigate )  
best regards  
philippe

On Tuesday, February 4, 2014 12:22:54 PM UTC+1, Costin Leau wrote:

> The port and host are 9200 and localhost by default. What's your ES  
> version?  
> ES-Hadoop requires 0.90 or higher (preferably the latest 0.90).
> 
> On 04/02/2014 12:59 PM, Phil gib wrote:
> 
> > ```
> > Hello Costin, 
> > 
> > ```
> > 
> > changing to "es.resource" does not help... ☹  
> > argh.. i see the socket connection closed in the ES logs.. so ES is  
> > contacted ... the 9200 is correct ?
> > 
> > philippe  
> > best regards
> > 
> > ```
> > configuration.set("es.resource", "eshindex2/eshlog2/_search?q=*"); 
> > configuration.set("es.host", "localhost"); 
> > configuration.set("es.port", "9200"); 
> > System.out.println("conf:"+ configuration); 
> > JobConf job = new JobConf(configuration, 
> > 
> > ```
> 
> SimpleJobES2Hadoop.class);
> 
> > ...................
> > 
> > On Tuesday, February 4, 2014 11:07:37 AM UTC+1, Costin Leau wrote:
> > 
> > ```
> > If you are using M1 you should use es.resource instead of es.query 
> > 
> > ```
> 
> in your latest example.
> 
> > ```
> > es.query is supported in the upcoming 1.3.0.M2 (not in m1). 
> > 
> > On 04/02/2014 12:01 PM, Phil gib wrote: 
> > > hello my context: 
> > > ES 0.90.3, elasticsearch-hadoop-1.3.0.M1 , eclipse- java 
> > > i am experimenting ES->Hadoop and Hadoop->ES 
> > > no problem with Hadoop2ES with these 3 settings ( i see the 
> > 
> > ```
> 
> index + data through head plugin, perfect)
> 
> > ```
> > > job.set("es.resource", "eshindex2/eshlog2"); 
> > > job.set("es.host", "localhost"); 
> > > job.set("es.port", "9200"); 
> > > but experimenting the inverse , ie ES 2 Hadoop 
> > > .... 
> > > configuration.set("es.query", 
> > 
> > ```
> 
> "eshindex2/eshlog2/\_search?q=\*");
> 
> > ```
> > > configuration.set("es.host", "localhost"); 
> > > configuration.set("es.port", "9200"); 
> > > System.out.println("conf:"+ configuration); 
> > > JobConf job = new JobConf(configuration, 
> > 
> > ```
> 
> SimpleJobES2Hadoop.class);
> 
> > ```
> > > ................... 
> > > i got the error 
> > > 10:58:27 INFO mapred.JobClient: Cleaning up the staging area 
> > > 
> > 
> > ```
> 
> file:/tmp/hadoop-xxx/mapred/staging/xxx-1302405475/.staging/job\_local\_0001
> 
> > ```
> > > Exception in thread "main" java.lang.NullPointerException 
> > > at 
> > 
> > ```
> 
> org.elasticsearch.hadoop.rest.dto.Node.(Node.java:30)
> 
> > ```
> > > at 
> > 
> > ```
> 
> org.elasticsearch.hadoop.rest.RestClient.getNodes(RestClient.java:139)
> 
> > ```
> > > 
> > > 
> > > Any idea? 
> > > bestsregards 
> > > philippe 
> > > 
> > > -- 
> > > 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
> 
> > ```
> > >elasticsearc...@googlegroups.com <javascript:>. 
> > > To view this discussion on the web visit 
> > >
> > 
> > ```
> 
> [https://groups.google.com/d/msgid/elasticsearch/2a52b4e7-3ecd-491b-8c6e-1d8d521260ef%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2a52b4e7-3ecd-491b-8c6e-1d8d521260ef%40googlegroups.com)
> 
> > ```
> > <
> > 
> > ```
> 
> [https://groups.google.com/d/msgid/elasticsearch/2a52b4e7-3ecd-491b-8c6e-1d8d521260ef%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2a52b4e7-3ecd-491b-8c6e-1d8d521260ef%40googlegroups.com)\>.
> 
> > ```
> > > For more options, visithttps://groups.google.com/groups/opt_out <
> > 
> > ```
> 
> [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out)\>.
> 
> > ```
> > -- 
> > Costin 
> > 
> > ```
> > 
> > --  
> > 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  
> > [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit
> 
> [https://groups.google.com/d/msgid/elasticsearch/1353d6b0-830e-4881-b10d-533639227a1c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/1353d6b0-830e-4881-b10d-533639227a1c%40googlegroups.com).
> 
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> Costin

--  
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/8f8fbb72-097d-47e8-8c2c-d2f74a1f4b00%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8f8fbb72-097d-47e8-8c2c-d2f74a1f4b00%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 1:52am UTC](https://discuss.elastic.co/t/hadoop-to-es-problem/15584/6 "2017-07-06T01:52:45Z")

</div>


