Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Import MongoDB data into Hive Error: Splitter implementation is incompatible

Highlighted

Import MongoDB data into Hive Error: Splitter implementation is incompatible

Expert Contributor

I'm trying to import mongodb data into hive.

The jar versions that i have used are

ADD JAR /root/HDL/mongo-java-driver-3.4.2.jar;
ADD JAR /root/HDL/mongo-hadoop-hive-2.0.2.jar;
ADD JAR /root/HDL/mongo-hadoop-core-2.0.2.jar;

And my cluster versions are

Ambari - Version 2.6.0.0, HDFS 2.7.3, Hive 1.2.1000, HBase 1.1.2, Tez 0.7.0 MongoDB Server version :- 3.6.5

Hive Script:-

CREATE TABLE swipeCardTable
( ID STRING,
EmpID STRING,
BeginDate STRING,
EndDate STRING,
Time STRING,
Type STRING,
Location STRING,
Terminal STRING)
STORED BY 'com.mongodb.hadoop.hive.MongoStorageHandler'
WITH SERDEPROPERTIES('mongo.columns.mapping'='{"ID":"_id","EmpID":"emp_id","BeginDate":"begin_date","EndDate":"end_date","Time":"time","Type":"time_event_type","Location":"location","Terminal":"terminal"}')
TBLPROPERTIES('mongo.uri'='mongodb://ro-myworld:romyworld123@10.10.170.43:27017/myworld.swipeCardTable')



Output:-

hive> select * from sampletable;

OK

Failed with exception java.io.IOException:java.io.IOException: Failed to aggregate sample documents. Note that this Splitter implementation is incompatible with MongoDB versions prior to 3.2.

Please suggest me how can i solve this.

Thanks,

Mohan V