hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wzc <wzc1...@gmail.com>
Subject Re: Hivemetastore Error: Duplicate entry
Date Mon, 20 Oct 2014 13:19:14 GMT
We also encounter this problem. It seems that it happens in
various situations. Currently we patch
https://issues.apache.org/jira/browse/HIVE-7167 which has some retries
logics in init HiveMetaStoreClient and hope to reduce the occurrence of
this problem.

Thanks.



2014-07-02 22:40 GMT+08:00 hadoop hive <hadoophive@gmail.com>:

> Seems that you are inserting duplicate record into that global table.
>
> Can you show the query ???
> On Jun 26, 2014 8:19 AM, "张伟" <zhangwei.justin@gmail.com> wrote:
>
>> I run hive-0.13.1 on hadoop-2.2.0. When I insert into an orc table, then
>> i get the following ERROR, indicating that Hive is trying to insert
>> duplicate entry to a table which is called "GLOBAL_PRIVS".  Any idea how to
>> fix it?
>>
>> Exception in thread "main" java.lang.RuntimeException:
>> java.lang.RuntimeException: Unable to instantiate
>> org.apache.hadoop.hive.metastore.HiveMetaStoreClient
>>         at
>> org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:346)
>>         at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:681)
>>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:625)
>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>         at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>         at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>         at java.lang.reflect.Method.invoke(Method.java:606)
>>         at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
>> Caused by: java.lang.RuntimeException: Unable to instantiate
>> org.apache.hadoop.hive.metastore.HiveMetaStoreClient
>>         at
>> org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1412)
>>         at
>> org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:62)
>>         at
>> org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:72)
>>         at
>> org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:2453)
>>         at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:2465)
>>         at
>> org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:340)
>>         ... 7 more
>> Caused by: java.lang.reflect.InvocationTargetException
>>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>> Method)
>>         at
>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
>>         at
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>>         at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
>>         at
>> org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1410)
>>         ... 12 more
>> Caused by: javax.jdo.JDODataStoreException: Exception thrown flushing
>> changes to datastore
>> NestedThrowables:
>> java.sql.BatchUpdateException: Duplicate entry 'admin-ROLE-All-admin-ROLE'
>> for key 'GLOBALPRIVILEGEINDEX'
>>         at
>> org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:451)
>>         at
>> org.datanucleus.api.jdo.JDOTransaction.commit(JDOTransaction.java:165)
>>         at
>> org.apache.hadoop.hive.metastore.ObjectStore.commitTransaction(ObjectStore.java:406)
>>         at
>> org.apache.hadoop.hive.metastore.ObjectStore.grantPrivileges(ObjectStore.java:3877)
>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>         at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>         at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>         at java.lang.reflect.Method.invoke(Method.java:606)
>>         at
>> org.apache.hadoop.hive.metastore.RawStoreProxy.invoke(RawStoreProxy.java:108)
>>         at com.sun.proxy.$Proxy7.grantPrivileges(Unknown Source)
>>         at
>> org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.createDefaultRoles(HiveMetaStore.java:567)
>>         at
>> org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.init(HiveMetaStore.java:398)
>>         at
>> org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.<init>(HiveMetaStore.java:356)
>>         at
>> org.apache.hadoop.hive.metastore.RetryingHMSHandler.<init>(RetryingHMSHandler.java:54)
>>         at
>> org.apache.hadoop.hive.metastore.RetryingHMSHandler.getProxy(RetryingHMSHandler.java:59)
>>         at
>> org.apache.hadoop.hive.metastore.HiveMetaStore.newHMSHandler(HiveMetaStore.java:4944)
>>         at
>> org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:171)
>>         ... 17 more
>>
>

Mime
View raw message