sqoop导入Hbase 报错:ERROR tool ImportTool: Import failed:Can not create a Path from a null string

sqoop导入hbase,报错ERROR tool ImportTool: Import failed:Can not create a Path from a null string

解决:添加--target-dir /tmp参数,这个参数没有什么实际作用,生成的中间结果默认在/user/${执行用户}/_sqoop/下

sqoop import \
--driver "com.mysql.jdbc.Driver" \
--connect "jdbc:mysql://ip:3306/db?useUnicode=true&characterEncoding=utf8" \
--username root \
--password pwd \
--query "select id, name, age from tb where \$CONDITIONS" \
--hbase-create-table \
--hbase-table "h_tb" \
--hbase-row-key "id,name" \
--column-family "f" \
--hbase-bulkload \
--split-by 'age' \
-m 10 \
--target-dir /tmp \

 

你可能感兴趣的:(sqoop,error)