You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Masf <ma...@gmail.com> on 2017/01/26 09:24:23 UTC

Load SequenceFile from MapReduce output

Hi.

I have a mapReduce that is writing a sequence file. These sequence object
is custom object developed by me "com.masfworld.MyClass".

So, I´m trying to map the output of my mapreduce to a hive table such as:

CREATE EXTERNAL TABLE test_seq(id string)
STORED AS SEQIENCEFILE
LOCATION '/pathOutputMapReduce'

ADD JAR 'MyComponent.jar' => This jar contains "com.masfworld.MyClass"

Then, when I try to do a select it returns an error:

SELECT * from test_seq limit 2;

*Failed with exception java.io.IOException:java.lang.ClassCastException:
com.masfworld.MyClass cannot be cast to
org.apache.hadoop.io.BinaryComparable*


Can someone help me?

Thanks!!!

-- 


Regards.
Miguel Ángel