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.