# ES-hive query error--EsHiveSplit not found

**URL:** <https://discuss.elastic.co/t/es-hive-query-error-eshivesplit-not-found/66347>\
**Category:** Elasticsearch\
**Tags:** es-hadoop\
**Created:** [November 17, 2016, 8:45am UTC](https://discuss.elastic.co/t/es-hive-query-error-eshivesplit-not-found/66347 "2016-11-17T08:45:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gzvince](https://avatars.discourse-cdn.com/v4/letter/g/57b2e6/32.png) [@gzvince](https://discuss.elastic.co/u/gzvince)\
**Post date:** [November 17, 2016, 8:45am UTC](https://discuss.elastic.co/t/es-hive-query-error-eshivesplit-not-found/66347/1 "2016-11-17T08:45:43Z")

</div>

Version of ES: 2.4.1  
version of Es-Hadoop jar: 2.4.0  
CDH version: 5.8.3

Hello All:

I am using Elasticsearch-hadoop jar to connect ES and hive. Following my create table SQL:

```
CREATE EXTERNAL TABLE weather_observe_t (
	errorcode	string,
	time	string)
ROW FORMAT SERDE 'org.elasticsearch.hadoop.hive.EsSerDe'
STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler'
TBLPROPERTIES(
'es.nodes' = '10.24.56.99',
'es.port' = '9200',
'es.resource' = 'logstash-weather-observe/weatherlog',
'es.query' = '?q=*',
'es.field.read.empty.as.null' = 'false',
'es.mapping.names' = 'errorcode:errorCode');

```

I excuted select SQL:  
**select \* from weather\_observe\_t;**  
It's done and got the result.

Then I excuted another SQL:  
**select \* from weather\_observe\_t order by time desc limit 10;**

But I got the error:  
Error: java.io.IOException: Cannot create an instance of InputSplit class = org.elasticsearch.hadoop.hive.EsHiveInputFormat$EsHiveSplit:Class org.elasticsearch.hadoop.hive.EsHiveInputFormat$EsHiveSplit not found  
\_ at org.apache.hadoop.hive.ql.io.HiveInputFormat$HiveInputSplit.readFields(HiveInputFormat.java:166)  
\_ at org.apache.hadoop.io.serializer.WritableSerialization$WritableDeserializer.deserialize(WritableSerialization.java:71)  
\_ at org.apache.hadoop.io.serializer.WritableSerialization$WritableDeserializer.deserialize(WritableSerialization.java:42)  
\_ at org.apache.hadoop.mapred.MapTask.getSplitDetails(MapTask.java:372)  
\_ at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:426)  
\_ at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343)  
\_ at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:164)  
\_ at java.security.AccessController.doPrivileged(Native Method)  
\_ at javax.security.auth.Subject.doAs(Subject.java:415)  
\_ at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1709)  
\_ at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158)  
\_Caused by: java.lang.ClassNotFoundException: Class org.elasticsearch.hadoop.hive.EsHiveInputFormat$EsHiveSplit not found  
\_ at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:2105)  
\_ at org.apache.hadoop.hive.ql.io.HiveInputFormat$HiveInputSplit.readFields(HiveInputFormat.java:163)  
\_ ... 10 more

Any help is greatly appreciated.

---

<div class="post-metadata">

**Author:** ![james.baiera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/james.baiera/32/10209_2.png) [@james.baiera](https://discuss.elastic.co/u/james.baiera)\
**Post date:** [November 18, 2016, 5:23pm UTC](https://discuss.elastic.co/t/es-hive-query-error-eshivesplit-not-found/66347/2 "2016-11-18T17:23:46Z")

</div>

Is the ES-Hadoop jar correctly distributed to the cluster running Hive? Normally Hive is able to perform the basic `select *` queries in the local process as it's just reading the data as is from the source, but any further operations like grouping or sorting needs to be handled by the distributed portion of Hive. In this case the most likely cause is that the second query is trying to submit a job and the ES-Hadoop jar is not available on the job workers' classpaths.

---

<div class="post-metadata">

**Author:** ![gzvince](https://avatars.discourse-cdn.com/v4/letter/g/57b2e6/32.png) [@gzvince](https://discuss.elastic.co/u/gzvince)\
**Post date:** [November 19, 2016, 2:08am UTC](https://discuss.elastic.co/t/es-hive-query-error-eshivesplit-not-found/66347/3 "2016-11-19T02:08:46Z")

</div>

I make a mistake before.

I add the elasticsearch-hadoop-2.4.0 in the hive lib. But I forgot there is a elasticsearch-hadoop-2.3.2 in it. Then I remove 2.3.2 jar lib directly.

I think hive could be use the old 2.3.2 jar lib but they couldn't found that. How can I assign the 2.4.0 jar lib in hive?

---

<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:** [December 17, 2016, 2:09am UTC](https://discuss.elastic.co/t/es-hive-query-error-eshivesplit-not-found/66347/4 "2016-12-17T02:09:06Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
