使用Sqoop从mysql向hdfs或者hive导入数据时出现的一些错误

时间:2021-10-09 17:34:47

1.原表没有设置主键,出现错误提示:

ERROR tool.ImportTool: Error during import: No primary key could be found for table xxx. Please specify one with --split-by or perform a sequential import with '-m 1'

提示说明的很清楚:在表xxx没有发现主键,使用--split-by指定一个column作为拆分字段或者在命令行上添加 ‘-m 1',为什么会出现这样的错误提示,我们需要了解一下Sqoop的并行导入机制:

一般来说,Sqoop会创建4个进程,同时进行数据导入操作

如果要导入表的主键为id,并行的数量为4,那么Sqoop首先会执行如下一个查询:

select max(id) as max, select min(id) as min from table [where 如果指定了where子句];

通过这个查询,获取到需要拆分字段(id)的最大值和最小值,假设分别是1和1000。

然后,Sqoop会根据需要并行导入的数量,进行拆分查询,比如上面的这个例子,并行导入将拆分为如下4条SQL同时执行:

select * from table where 0 <= id < 250;

select * from table where 250 <= id < 500;

select * from table where 500 <= id < 750;

select * from table where 750 <= id < 1000;

注意,这个拆分的字段需要是整数。

如果要导入的表中没有主键,则我们应该手动选取一个合适的拆分字段。

首先查看表中有那些字段,如查看表student:desc student;

表中有id,name两个字段,那我们就可以选取id作为拆分字段,将表导入hive时在命令中添加 --split-by id,就不会报错了。

参考:http://www.cnblogs.com/gpcuster/archive/2011/03/01/1968027.html

2.Sqoop Hive exited with status 1

当从mysql向Hive导入数据时,执行:

 sqoop import --connect jdbc:mysql://localhost/hive --username hive --password hive --table dept_InnoDB --hive-table dept_InnoDB --hive-import --split-by deptno 

出现以下错误:

// :: INFO hive.HiveImport: Exception in thread "main" java.lang.NoSuchMethodError: org.apache.thrift.EncodingUtils.setBit(BIZ)B
// :: ERROR tool.ImportTool: Encountered IOException running import job: java.io.IOException: Hive exited with status 

google之,原来是机器上装的hive和hbase的版本不兼容造成的,在这里具体的说是hive和habse所使用的thrift版本不一样。当hive和hbase的jar包都添加到CLASSPATH时,运行Sqoop时只会激活一个版本的thrift,这样往往导致hive运行出错。

执行:

locate *thrift*.jar

看到:

aaarticlea/png;base64,iVBOR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xHgFKKJwJFISXhWSpbuCooUpcTEVqMWA214B1x8VimZYc9KSZYD+fPEkuvpNqUjJKoky/qOv882QqVCCX3mGNvXvE48Bm6x0Fw6U9InEtKL6QJ2bPkKv1Zm+Y7z+sZZfG/6SmvqG/DU/0ceyINRYVU8HrDBxyX/pS9F7++mvTlfPwAAAIlSURBVMJ6OehBmeW8SYYlj28mfOHzFlcF5WdDKAy+LlXQpq/BC2puMivD/J9WBNgtsPLJJM2cY1p0KSCR/RAQl/6ETgpfi/QnwqTGn3azDNA2NdVTpVVr2vvGrW14mNl8lojFAi79icXKt54mssvBFE/EVUFrJAsUsDRhu1EFBQhQMqviL/jnGTgsnjDLeZLB2wsnUznaqrj0p2SRIUEpAPPwmoqR/mzCQK/Oz8kt0pngvbJn9aPTNwr4Njm49Ce8o/BcLgPCuxxsKUlcFVTCgAGrZ7YbVVCgDmZdhq9fsstWzyMI7YHrPfa7EuiFS39O2xteQjLuov362sV3rBcJZL6AzMNaVIz0J7qbVTfr3auHebdBIyc5zfnRLP38r5tDec+nUIC49Cesl/C8ZgZwVVCUC5AopPTCmhD1TOVXBeVGBVCAsvHjLZ8gt+MONVd3hpbyZF9x6c+gRQi9LPW0+93Ali052AqkYmYrBUl/IuSeq/3OLTWozHoTd2vbn0eCXuY1y36yIOLSn2I6Cs/mMoCrgoJDQcmlJNuFKqgiOVSkLXDU4DnyZACX/pQnm0rRFq4KCuyGdi0lqSTgFQlDkbaAQYNnyIEBXPpTDiQqbRO4Kiiga9q1lKSSgFckDEXaAoQMniwnBnDpTzkRqZTN4KqgStktOCicAZwBnIGvkQGRl6S/Ridxn3AGcAZwBnAGlIEBfMlRhl7AMeAM4AzgDHwTDPwfYGfQPHFUVscAAAAASUVORK5CYII=" alt="" />

果然,hive和hbase引用了不同版本的thrift.

这个问题解决起来也非常简单,将HBASE_HOME设置为空,让Sqoop不能加载hbase版本的thrift就OK了。

参考:http://*.com/questions/16133156/sqoop-hive-exited-with-status-1