You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sqoop.apache.org by "leornado (JIRA)" <ji...@apache.org> on 2015/11/05 17:35:27 UTC

[jira] [Created] (SQOOP-2663) Duplicate entry for key 'PRIMARY' when export Sequencefile to mysql

leornado created SQOOP-2663:
-------------------------------

             Summary: Duplicate entry for key 'PRIMARY' when export Sequencefile to mysql 
                 Key: SQOOP-2663
                 URL: https://issues.apache.org/jira/browse/SQOOP-2663
             Project: Sqoop
          Issue Type: Bug
          Components: sqoop2-server
    Affects Versions: 1.99.5
         Environment: hadoop ha with kerberos (3nodemanager, 2rm). hdfs ha with kerberos (3dn, 2namenode), sqoop 1.99.5 mysql  Ver 14.14 Distrib 5.1.73
            Reporter: leornado


Sorry for my english!
Step1: I create a job to import a mysql table(has 3 records) into hdfs(result with 2 .seq file) with sequencefile format success.
Step2: Then I create another job to export the files from Step1 into mysql table(another table with same construct of Step1 table bug diff name).
I got error "Duplicate entry for key 'PRIMARY'" for each record.
I remove the primary constraints from the table(Step2). Then the export job run successful. But each record has 3 copies in that table.
I do this use sqoop1 before and everything is ok(PK is on).
In sqoop1 I can use arguments "-m 1" and there is a codegen jar specified when export. Does anything I can do to prevent this problem in sqoop2? 
Thanks a lot!



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)