Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

java error while paralel insert

Highlighted

java error while paralel insert

Contributor

Hello 

 

I am inserting (copying) data from parquet table to gzipped parquet table with paralel insert overwrite ... select .. from table statements. Sometimes I get following error. (BTW If I monitor this problem correctly it occurs on copying data that inserting into same table) 

 

My environment is RHEL 6.6,  impalad version 2.2.0-cdh5.4.5

$ java -version
java version "1.7.0_65"
OpenJDK Runtime Environment (rhel-2.5.1.2.el6_5-x86_64 u65-b17)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)

 

Is there any way to fix this error ? Should I worry about it ?

 

Thanks

 

InternalException: Error updating lastDdlTime
CAUSED BY: MetaException: javax.jdo.JDOUserException: Object with id "" is managed by a different persistence manager
        at org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:549)
        at org.datanucleus.api.jdo.JDOTransaction.commit(JDOTransaction.java:165)
        at org.apache.hadoop.hive.metastore.ObjectStore.commitTransaction(ObjectStore.java:491)
        at org.apache.hadoop.hive.metastore.ObjectStore.getTable(ObjectStore.java:970)
        at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.hadoop.hive.metastore.RawStoreProxy.invoke(RawStoreProxy.java:98)
        at com.sun.proxy.$Proxy2.getTable(Unknown Source)
        at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.get_table_core(HiveMetaStore.java:1772)
        at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.alter_table_core(HiveMetaStore.java:3343)
        at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.alter_table_with_environment_context(HiveMetaStore.java:3325)
        at sun.reflect.GeneratedMethodAccessor62.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:102)
        at com.sun.proxy.$Proxy4.alter_table_with_environment_context(Unknown Source)
        at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$alter_table_with_environment_context.getResult(ThriftHiveMetastore.java:9105)
        at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$alter_table_with_environment_context.getResult(ThriftHiveMetastore.java:9089)
        at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
        at org.apache.hadoop.hive.metastore.TUGIBasedProcessor$1.run(TUGIBasedProcessor.java:110)
        at org.apache.hadoop.hive.metastore.TUGIBasedProcessor$1.run(TUGIBasedProcessor.java:106)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:422)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1671)
        at org.apache.hadoop.hive.metastore.TUGIBasedProcessor.process(TUGIBasedProcessor.java:118)
        at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:285)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
NestedThrowablesStackTrace:
Object with id "" is managed by a different persistence manager
org.datanucleus.exceptions.NucleusUserException: Object with id "" is managed by a different persistence manager
        at org.datanucleus.ExecutionContextImpl.detachObject(ExecutionContextImpl.java:2843)
        at org.datanucleus.ExecutionContextThreadedImpl.detachObject(ExecutionContextThreadedImpl.java:329)
        at org.datanucleus.store.types.SCOUtils.detachForCollection(SCOUtils.java:1139)
        at org.datanucleus.store.fieldmanager.DetachFieldManager.internalFetchObjectField(DetachFieldManager.java:177)
        at org.datanucleus.store.fieldmanager.AbstractFetchDepthFieldManager.fetchObjectField(AbstractFetchDepthFieldManager.java:113)
        at org.datanucleus.state.JDOStateManager.detach(JDOStateManager.java:3995)
        at org.datanucleus.ExecutionContextImpl.performDetachAllOnTxnEnd(ExecutionContextImpl.java:4610)
        at org.datanucleus.ExecutionContextImpl.postCommit(ExecutionContextImpl.java:4709)
        at org.datanucleus.ExecutionContextImpl.transactionCommitted(ExecutionContextImpl.java:659)
        at org.datanucleus.TransactionImpl.internalPostCommit(TransactionImpl.java:554)
        at org.datanucleus.TransactionImpl.commit(TransactionImpl.java:335)
        at org.datanucleus.api.jdo.JDOTransaction.commit(JDOTransaction.java:98)
        at org.apache.hadoop.hive.metastore.ObjectStore.commitTransaction(ObjectStore.java:491)
        at org.apache.hadoop.hive.metastore.ObjectStore.getTable(ObjectStore.java:970)
        at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.hadoop.hive.metastore.RawStoreProxy.invoke(RawStoreProxy.java:98)
        at com.sun.proxy.$Proxy2.getTable(Unknown Source)
        at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.get_table_core(HiveMetaStore.java:1772)
        at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.alter_table_core(HiveMetaStore.java:3343)
        at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.alter_table_with_environment_context(HiveMetaStore.java:3325)
        at sun.reflect.GeneratedMethodAccessor62.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:102)
        at com.sun.proxy.$Proxy4.alter_table_with_environment_context(Unknown Source)
        at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$alter_table_with_environment_context.getResult(ThriftHiveMetastore.java:9105)
        at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$alter_table_with_environment_context.getResult(ThriftHiveMetastore.java:9089)
        at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
        at org.apache.hadoop.hive.metastore.TUGIBasedProcessor$1.run(TUGIBasedProcessor.java:110)
        at org.apache.hadoop.hive.metastore.TUGIBasedProcessor$1.run(TUGIBasedProcessor.java:106)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:422)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1671)
        at org.apache.hadoop.hive.metastore.TUGIBasedProcessor.process(TUGIBasedProcessor.java:118)
        at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:285)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

 

2 REPLIES 2
Highlighted

Re: java error while paralel insert

Master Guru
Could you further clarify if you are running these parallel inserts over Hive CLI or over Beeline (over a HS2)?

Also, is Hive Concurrency support [1] enabled in your cluster?

[1] - https://cwiki.apache.org/confluence/display/Hive/Configuration+Properties#ConfigurationProperties-hi...
Highlighted

Re: java error while paralel insert

Master Guru
It appears that I skipped past the part that mentions this occurs with Impala being the source of the query and not Hive.

Impala presently does not have concurrency control and parallel inserts into the same table could cause such errors due to the transactional nature of the HMS which receives the metadata updates/alters from insert queries.

Try avoiding concurrent inserts when using Impala.
Don't have an account?
Coming from Hortonworks? Activate your account here