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 Plain View
Hive >> mail # user >> Error while table creation


+
Abhishek Gayakwad 2013-03-09, 20:00
+
Viral Bajaria 2013-03-09, 21:04
+
Ramki Palle 2013-03-09, 23:07
+
Abhishek Gayakwad 2013-03-10, 07:23
Copy link to this message
-
Re: Error while table creation
Please use "if not exists" clause and let us know if it works.

I am wondering if a table exists already in your database with the same
name.

-Ramki.
On Sat, Mar 9, 2013 at 11:23 PM, Abhishek Gayakwad <[EMAIL PROTECTED]>wrote:

> it is an old installation, we recently upgraded hive 0.7.0 to 0.9.0
>
> and we are not using "if not exists" clause
>
>
> On Sun, Mar 10, 2013 at 4:37 AM, Ramki Palle <[EMAIL PROTECTED]>wrote:
>
>> Just wondering if your create table syntax include "if not exists" such
>> as
>>
>> CREATE EXTERNAL TABLE IF NOT EXISTS my_table (
>>
>> ...
>> ...
>> ...
>> )
>>
>>
>>
>> On Sun, Mar 10, 2013 at 2:34 AM, Viral Bajaria <[EMAIL PROTECTED]>wrote:
>>
>>> Is this is a new installation of Hive or did you upgrade ? How many
>>> tables do you already have ?
>>>
>>>
>>> On Sat, Mar 9, 2013 at 12:00 PM, Abhishek Gayakwad <[EMAIL PROTECTED]
>>> > wrote:
>>>
>>>> while trying to create external table in oozie hive action, I am getting following error, hive version is 0.9.0
>>>>
>>>>
>>>>
>>>> Caused by: javax.jdo.JDODataStoreException: Insert of object "org.apache.hadoop.hive.metastore.model.MColumnDescriptor@46c1dc0b" using statement "INSERT INTO `CDS` (`CD_ID`) VALUES (?)" failed : Duplicate entry 'XXXXX' for key 'PRIMARY'
>>>> NestedThrowables:
>>>> com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry 'XXXXX' for key 'PRIMARY'
>>>> at org.datanucleus.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:313)
>>>> at org.datanucleus.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:660)
>>>> at org.datanucleus.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java:680)
>>>> at org.apache.hadoop.hive.metastore.ObjectStore.createTable(ObjectStore.java:617)
>>>> ... 43 more
>>>> Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry 'XXXXX' for key 'PRIMARY'
>>>>
>>>>
>>>> Thanks,
>>>> Abhishek
>>>>
>>>>
>>>
>>
>
+
Dean Wampler 2013-03-10, 15:17
+
Abhishek Gayakwad 2013-03-12, 08:44
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