Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Sqoop >> mail # user >> MySQLIntegrityConstraintViolationException but not keys duplicated


Copy link to this message
-
Re: MySQLIntegrityConstraintViolationException but not keys duplicated
Hi Zoraida,
I don't think that there is any limitation on how many keys can be part of primary key during export operation. Would you mind sharing with us entire Sqoop log generated with parameter --verbose?

Jarcec

On Wed, Jul 03, 2013 at 08:49:07PM +0000, ZORAIDA HIDALGO SANCHEZ wrote:
> Hi all,
>
> All our MySQL tables have  composite primary keys (8 fields) and when we use sqoop for insert into them(from hive), we are getting this exception:
> java.io.IOException: Can't export data, please check task tracker logs
>         at org.apache.sqoop.mapreduce.TextExportMapper.map(TextExportMapper.java:112)
>         at org.apache.sqoop.mapreduce.TextExportMapper.map(TextExportMapper.java:39)
>         at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:140)
>         at org.apache.sqoop.mapreduce.AutoProgressMapper.run(AutoProgressMapper.java:64)
>         at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:673)
>         at org.apache.hadoop.mapred.MapTask.run(MapTask.java:331)
>         at org.apache.hadoop.mapred.Child$4.run(Child.java:268)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at javax.security.auth.Subject.doAs(Subject.java:396)
>         at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1408)
>         at org.apache.hadoop.mapred.Child.main(Child.java:262)
> Caused by: java.io.IOException: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '33-2013-02-13 23:00:00-Brasil-Play-None-None-None-None-  Filmes  for key 'PRIMARY
>
> There are no duplicated keys in our Hive tables however. Is there any constraint related to the number of fields that can belong to a PK?
> Thanks,
>
> Zoraida.-
>
>
>
> ________________________________
>
> Este mensaje se dirige exclusivamente a su destinatario. Puede consultar nuestra pol?tica de env?o y recepci?n de correo electr?nico en el enlace situado m?s abajo.
> This message is intended exclusively for its addressee. We only send and receive email on the basis of the terms set out at:
> http://www.tid.es/ES/PAGINAS/disclaimer.aspx
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB