sqoop-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Something Something <mailinglist...@gmail.com>
Subject QueryResult cannot be cast to org.apache.hadoop.io.WritableComparable
Date Tue, 04 Mar 2014 18:45:20 GMT
Here's how I ran into this issue:

1) Created a SequenceFile by exporting data from Oracle using Sqoop.
2) Used 'sqoop codegen' to generate a Hive table script.
3) Created table under Hive using this script.
4) Under Hive, ran following command:


5) select count(*) from mytable;

Got 'QueryResult cannot be cast to
org.apache.hadoop.io.WritableComparable'. When I looked at the generated
source, it indeed does not implement this interface. I think it should.

I guess the workaround is to implement the 'compare' method in this
interface. But shouldn't the code generation generate this in QueryResult?

Sounds like a bug to me -:) Either that or I am doing something really
stupid - which is always a possibility. Please share thoughts. Thanks.

View raw message