Sqoop Hive exited with status 1

Based on the log it seems that you're hitting following exception:

13/04/22 18:34:44 INFO hive.HiveImport: Exception in thread "main" java.lang.NoSuchMethodError: org.apache.thrift.EncodingUtils.setBit(BIZ)B

I've seen this issue before when users were using HBase and Hive in "incompatible" versions. The incompatibility can be generally on multiple levels, but this particular one is when HBase and Hive are using different thrift versions. As Sqoop is adding both HBase and Hive jars to the classpath, only one thrift version can be active and thus the "second" tool (usually hive) is not working properly.

Do you by any chance installed both HBase and Hive on the box where you're executing Sqoop? If so, can you check the thrift version that each project is using? Just search for "*thrift*.jar". If answer to both questions is positive, then you could potentially set HBASE_HOME to something non-existing to force Sqoop not load HBase's version of thrift.


I agree with Jarek Jarcec Cecho's answer.

Another workaround is to copy libthrift*.jar file from $HIVE_HOME/lib to $SQOOP_HOME/lib.

Tags:

Hadoop

Hive

Sqoop