导入到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的参数
问题解决