【Sqoop】sqoop导入数据时的错误

导入到Hive

ERROR tool.ImportAllTablesTool: Encountered IOException running import job: java.io.IOException: Generating splits for a textual index column allowed only in case of "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" property passed as a parameter

注意看下画线那一段错误,以及画粗线的那个错误

本来的sqoop语句:sqoop-import-all-tables --connect jdbc:mysql://192.168.6.139:3306/mysql --username root --password a --hive-import --create-hive-table

后来便遇到上述错误:

然后直接在  import-all-tables 后面加上 -Dorg.apache.sqoop.splitter.allow_text_splitter=true 就Ok了

改过来之后:

sqoop import-all-tables -Dorg.apache.sqoop.splitter.allow_text_splitter=true --connect jdbc:mysql://192.168.6.139:3306/mysql --username root --password a --hive-import --create-hive-table

参数-Dorg.apache.sqoop.splitter.allow_text_splitter=true的含义是允许文本类型(相当任意类型)的字段作为--split-by的参数

问题解决

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值