Sqoop合并问题 - Hortonworks

时间:2016-09-16 21:31:59

标签: hadoop sqoop

我在合并键属性上有一个主键列。任何帮助都非常适合

16/09/16 14:50:06 INFO mapreduce.Job: Task Id : attempt_1474053990963_0023_m_000000_2, Status : FAILED
Error: java.io.IOException: Cannot join values on null key. Did you specify a key column that exists?
        at org.apache.sqoop.mapreduce.MergeMapperBase.processRecord(MergeMapperBase.java:79)
        at org.apache.sqoop.mapreduce.MergeTextMapper.map(MergeTextMapper.java:58)
        at org.apache.sqoop.mapreduce.MergeTextMapper.map(MergeTextMapper.java:34)
        at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:146)
        at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:787)
        at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)
        at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:168)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:422)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
        at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:162)

1 个答案:

答案 0 :(得分:0)

最后我得到了解决方案。我正在使用mysql db并且表中的主键是以小写形式定义的,但是对于合并作业,我以大写形式给出了键。这导致了这个问题。一旦我以小写形式给出合并作业中的主键,作业就会成功运行