sqoop export --connect xxxxx \
--hcatalog-database chinaums --hcatalog-table bm_sy_travel_all_month \
--username xxx --password xxx \
--batch \
--call PROC_BM_SY_TRAVEL_ALL_MONTH \
--hcatalog-partition-keys pt --hcatalog-partition-values '2016-10' \
--input-null-string '\\N' --input-null-non-string '\\N'
当我运行上面的代码时,它会抛出以下错误
16/12/03 16:19:41 INFO mapreduce.Job: map 0% reduce 0%
**16/12/03 16:19:50 INFO mapreduce.Job: Task Id : attempt_1480326346381_0484_m_000000_0, Status : FAILED
Error: **java.lang.NullPointerException****
at org.apache.sqoop.mapreduce.hcat.SqoopHCatExportHelper.**convertToSqoopRecord**(SqoopHCatExportHelper.java:130)
at org.apache.sqoop.mapreduce.hcat.SqoopHCatExportMapper.map(SqoopHCatExportMapper.java:56)
at org.apache.sqoop.mapreduce.hcat.SqoopHCatExportMapper.map(SqoopHCatExportMapper.java:35)
at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:145)
at org.apache.sqoop.mapreduce.AutoProgressMapper.run(AutoProgressMapper.java:64)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:784)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)
at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:163)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1628)
at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158)
**16/12/03 16:19:58 INFO mapreduce.Job: Task Id : attempt_1480326346381_0484_m_000000_1, Status : FAILED
Error: java.lang.NullPointerException**
at org.apache.sqoop.mapreduce.hcat.SqoopHCatExportHelper.convertToSqoopRecord(SqoopHCatExportHelper.java:130)
at org.apache.sqoop.mapreduce.hcat.SqoopHCatExportMapper.map(SqoopHCatExportMapper.java:56)
at org.apache.sqoop.mapreduce.hcat.SqoopHCatExportMapper.map(SqoopHCatExportMapper.java:35)
at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:145)
at org.apache.sqoop.mapreduce.AutoProgressMapper.run(AutoProgressMapper.java:64)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:784)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)
at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:163)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1628)
at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158)
我的hive表是orc格式化的。我确信连接词是连接的。 怎么会发生.....
答案 0 :(得分:0)
在SqoopHCatExport中,列名称必须在Hive和oracle中匹配