- 折腾一下午,看网上说什么表的结构不一样,类型不匹配,有null的数据。对我来说都不是问题关键。
报错指令:
sqoop export --connect jdbc:mysql://localhost:3306/nk --username root --password root --table air --export-dir hdfs://192.168.100.100:9000/user/hive/warehouse/air_oneline --input-fields-terminated-by ',';
正确执行的指令:
sqoop export --connect jdbc:mysql://192.168.100.100:3306/nk --username root --password root --table air --export-dir hdfs://192.168.100.100:9000/user/hive/warehouse/air_oneline --input-fields-terminated-by ',';
我把localhost改成了ip地址,结果就成功执行。