[ 
https://issues.apache.org/jira/browse/HIVE-3469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13456356#comment-13456356
 ] 

rohithsharma commented on HIVE-3469:
------------------------------------

1. For the first problem , exception from JDO is primary constraint.

bq. Caused by: javax.jdo.JDODataStoreException: Insert of object 
"org.apache.hadoop.hive.metastore.model.MDatabase@63280c85" using statement 
"INSERT INTO DBS (DB_ID,DB_LOCATION_URI,"NAME","DESC") VALUES (?,?,?,?)" failed 
: The statement was aborted because it would have caused a duplicate key value 
in a unique or primary key constraint or unique index identified by 
'UNIQUE_DATABASE' defined on 'DBS'.

2. For the third proble, exception trace is  
{noformat}
2012-09-14 20:26:22,507 ERROR server.TThreadPoolServer 
(TThreadPoolServer.java:run(182)) - Error occurred during processing of message.
java.lang.RuntimeException: java.util.ConcurrentModificationException
        at 
org.apache.hadoop.hive.service.HiveServer$ThriftHiveProcessorFactory.getProcessor(HiveServer.java:572)
        at 
org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:169)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.util.ConcurrentModificationException
        at java.util.Hashtable$Enumerator.next(Hashtable.java:1031)
        at 
org.datanucleus.store.rdbms.query.legacy.JDOQLQuery.getParsedImports(JDOQLQuery.java:364)
        at 
org.datanucleus.store.rdbms.query.legacy.JDOQLQuery.compileInternal(JDOQLQuery.java:174)
        at org.datanucleus.store.query.Query.executeQuery(Query.java:1628)
        at 
org.datanucleus.store.rdbms.query.legacy.JDOQLQuery.executeQuery(JDOQLQuery.java:245)
        at org.datanucleus.store.query.Query.executeWithArray(Query.java:1499)
        at org.datanucleus.jdo.JDOQuery.execute(JDOQuery.java:243)
        at 
org.apache.hadoop.hive.metastore.ObjectStore.getMDatabase(ObjectStore.java:389)
        at 
org.apache.hadoop.hive.metastore.ObjectStore.getDatabase(ObjectStore.java:408)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         ...
         ...
         at $Proxy0.getDatabase(Unknown Source)
        at 
org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.createDefaultDB_core(HiveMetaStore.java:351)
        at 
org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.createDefaultDB(HiveMetaStore.java:375)
        at 
org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.init(HiveMetaStore.java:278)
  
{noformat}
                
> When new hive cluster is started, hive jdbc client hangs.
> ---------------------------------------------------------
>
>                 Key: HIVE-3469
>                 URL: https://issues.apache.org/jira/browse/HIVE-3469
>             Project: Hive
>          Issue Type: Bug
>          Components: Clients, Metastore, Thrift API
>         Environment: Hadoop-2.0.1 + Hive-0.9.0
>            Reporter: rohithsharma
>
> The scenario is as follows  : 
> For the new hive cluster , when multiple hive client is getting the 
> connection for hive server , there are 3 problems in metastore , hive client.
> 1. Since the derby is booted at first connection,  multiple client try to 
> create database.One of the client succeed and another one throw exception 
> because of *unique primary constraint* in metatables.
> 2. Once the Runtime exception is throw, the hive client which is made 
> connection request will hang forever.
> 3. Potentially "ConcurrentModificationException" is thrown by JDOQuery.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to