hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From S├ękine Coulibaly <scoulib...@gmail.com>
Subject Re: Hadoop update mysql table
Date Sat, 13 Apr 2013 23:45:49 GMT
Linlin,

A primary key means a unicity constraint being set on that column. You need
to update that line, not insert it, unless you use INSERT ... ON DUPLICATE
KEY UPDATE ... to perform your upserts.
This sounds more like a mySQL issue.

BR


2013/4/14 Jens Scheidtmann <jens.scheidtmann@gmail.com>

> Dear Linlin,
>
> seems you are having a SQL problem and not a hadoop one.
>
> If you INSERT another row with the same primary key, you will get this
> error. Are you really using UPDATE for writing back?
>
> Also check if MERGE is more appropriate, see
> http://en.wikipedia.org/wiki/Merge_%28SQL%29
>
> Best regards,
>
> Jens
>

Mime
View raw message