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.

Unable to create serializer for class com.mongodb.hadoop.hive.input.HiveMongoInputFormat

Highlighted

Unable to create serializer for class com.mongodb.hadoop.hive.input.HiveMongoInputFormat

Explorer

Hi,

I am facing issue with oozie workflow, i created a table which is linked to hive and mongo db using the below syntax

CREATE TABLE IF NOT EXISTS test.emp_test
(
id INT,
name STRING
) STORED BY 'com.mongodb.hadoop.hive.MongoStorageHandler'
TBLPROPERTIES('mongo.uri'='mongodb://localhost:27017/test.emp_test');

 

add jar hdfs:///data/jars/mongo-hadoop-core-1.3.2.jar;
add jar hdfs:///data/jars/mongo-hadoop-hive-1.3.2.jar;
add jar hdfs:///data/jars/mongodb-driver-3.0.2.jar;

 

insert into test.emp_test values(1,"Raghava");

if i remove the insert statement which is working fine, if i add the insert  statement i am facing the below issue

ERROR org.apache.hadoop.hive.ql.exec.Utilities  - Error caching map.xml: org.apache.hive.com.esotericsoftware.kryo.KryoException: java.lang.IllegalArgumentException: Unable to create serializer "org.apache.hive.com.esotericsoftware.kryo.serializers.FieldSerializer" for class: com.mongodb.hadoop.hive.input.HiveMongoInputFormat

 

Can someone help me what could be the reason.

1 REPLY 1

Re: Unable to create serializer for class com.mongodb.hadoop.hive.input.HiveMongoInputFormat

Master Guru
Can you ensure that the mongodb jars are also present in your Oozir workflow's lib/ directory? The local serialization of the types may rely at loading and finding the class locally which ADD JAR may not be achieving right.
Don't have an account?
Coming from Hortonworks? Activate your account here