Sqoop:Error during export:Export job failed !
sqoop导出数据到mysql出现异常,平时都很正常的今天不行了,还没什么报错信息,是不是很郁闷。博客上的文章也不太行。。。自己想想原来是这个问题
21/08/25 15:03:05 ERROR tool.ExportTool: Error during export: Export job failed! at org.apache.sqoop.mapreduce.ExportJobBase.runExport(ExportJobBase.java:439) at org.apache.sqoop.manager.SqlManager.exportTable(SqlManager.java:931) at org.apache.sqoop.tool.ExportTool.exportTable(ExportTool.java:80) at org.apache.sqoop.tool.ExportTool.run(ExportTool.java:99) at org.apache.sqoop.Sqoop.run(Sqoop.java:147) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70) at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:183) at org.apache.sqoop.Sqoop.runTool(Sqoop.java:234) at org.apache.sqoop.Sqoop.runTool(Sqoop.java:243) at org.apache.sqoop.Sqoop.main(Sqoop.java:252)
几种可能性
1、转换:空值问题需要转换 –input-fields-terminated-by ‘\001’ –input-null-string ‘\N’ –input-null-non-string ‘\N’ 2、表结构不一致,hive表的字段mysql表一定要有,mysql字段可以多不能少 3、mysql表字段长度给少了,给少了,给少了(坑了我半天,,shit),改下结构就好了
|