# Can you help to check this error please?

**URL:** https://discuss.elastic.co/t/can-you-help-to-check-this-error-please/44310
**Category:** Elasticsearch
**Tags:** es-hadoop
**Created:** [March 14, 2016, 11:23am UTC](https://discuss.elastic.co/t/can-you-help-to-check-this-error-please/44310 "2016-03-14T11:23:59Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Kramer\_Li](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kramer_li/32/46872_2.png) [@Kramer\_Li](https://discuss.elastic.co/u/Kramer_Li)
#### Post date: [March 14, 2016, 11:24am UTC](https://discuss.elastic.co/t/can-you-help-to-check-this-error-please/44310/1 "2016-03-14T11:24:00Z")

</div>

I `m trying to read from data ElasticSearch to spark ?

```
conf = {"es.resource":"sflow_*/sflow","es.nodes":"ES01","es.query":'some query'}

rdd = sc.newAPIHadoopRDD("org.elasticsearch.hadoop.mr.EsInputFormat", "org.apache.hadoop.io.NullWritable", "org.elasticsearch.hadoop.mr.LinkedMapWritable", conf=conf)

rdd.take(2)

```

After rdd.take(2) The process will stuck and issue the warn log like below

```
16/03/14 20:52:07 WARN httpclient.SimpleHttpConnectionManager: SimpleHttpConnectionManager being used
incorrectly. Be sure that HttpMethod.releaseConnection() is always called and that only one thread and/or 
method is using this connection manager at a time.

```

But use rdd.first() will always return result successfully. Do you know why?

---

<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: [March 21, 2016, 10:13am UTC](https://discuss.elastic.co/t/can-you-help-to-check-this-error-please/44310/2 "2016-03-21T10:13:55Z")

</div>

Looks like a bug. `EsInputFormat` or any `InputFormat` for that matter should be used single-threaded-ly yet in your case it looks like that is not the case.  
Are you using Python or Scala?

---

<div class="post-metadata">

### Author: ![Kramer\_Li](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kramer_li/32/46872_2.png) [@Kramer\_Li](https://discuss.elastic.co/u/Kramer_Li)
#### Post date: [March 23, 2016, 3:05am UTC](https://discuss.elastic.co/t/can-you-help-to-check-this-error-please/44310/3 "2016-03-23T03:05:15Z")

</div>

Hi Costin

I am using python. So this is a bug not because I`m doing it in a wrong way? right?

Thanks verymuch

---

<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: [April 5, 2016, 2:34pm UTC](https://discuss.elastic.co/t/can-you-help-to-check-this-error-please/44310/4 "2016-04-05T14:34:18Z")

</div>

Sorry, I don't know enough Python to be able to help. It's likely that the Hadoop Input/Output format are used incorrectly but looking at your code it doesn't seem that you are doing much so maybe there's something else going on in Spark/Python.

Sorry...

---

<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:25pm UTC](https://discuss.elastic.co/t/can-you-help-to-check-this-error-please/44310/5 "2017-07-06T13:25:31Z")

</div>


