Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive >> mail # user >> exception when using Hive 0.12 with MySQL metastore


Copy link to this message
-
Re: exception when using Hive 0.12 with MySQL metastore
jov
On Oct 20, 2013 8:07 AM, "Zhang Xiaoyu" <[EMAIL PROTECTED]> wrote:
>
> Hi, all,
> When I using Hive 0.12 with MySQL metastore. I set those properties in
hive-site.xml.
> datanucleus.autoCreateSchema = false
> datanucleus.autoCreateTables= false
you should set these properties to true,then hive will auto add new column.
>
> In beeline, "show tables" is fine, but create a new table got below
exception, any idea? Since I create the metastore table by the hive 0.12
scheme script, it shouldn't complain about the missing columns in metastore
tables.
>
> Thanks,
> Johnny
>
> -------------------------
>
> FAILED: Error in metadata:
MetaException(message:javax.jdo.JDODataStoreException: Add request failed :
INSERT INTO `COLUMNS_V2`
(`CD_ID`,`FCOMMENT`,`COLUMN_NAME`,`TYPE_NAME`,`INTEGER_IDX`) VALUES
(?,?,?,?,?)
> at
org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:422)
> at
org.datanucleus.api.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:745)
> at
org.datanucleus.api.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java:765)
> at
org.apache.hadoop.hive.metastore.ObjectStore.createTable(ObjectStore.java:638)
> 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:601)
> at
org.apache.hadoop.hive.metastore.RetryingRawStore.invoke(RetryingRawStore.java:111)
> at sun.proxy.$Proxy6.createTable(Unknown Source)
> at
org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table_core(HiveMetaStore.java:1081)
> at
org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table_with_environment_context(HiveMetaStore.java:1114)
> 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:601)
> at
org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:102)
> at sun.proxy.$Proxy8.create_table_with_environment_context(Unknown Source)
> at
org.apache.hadoop.hive.metastore.HiveMetaStoreClient.createTable(HiveMetaStoreClient.java:464)
> at
org.apache.hadoop.hive.metastore.HiveMetaStoreClient.createTable(HiveMetaStoreClient.java:453)
> 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:601)
> at
org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaStoreClient.java:74)
> at sun.proxy.$Proxy10.createTable(Unknown Source)
> at org.apache.hadoop.hive.ql.metadata.Hive.createTable(Hive.java:593)
> at org.apache.hadoop.hive.ql.exec.DDLTask.createTable(DDLTask.java:3784)
> at org.apache.hadoop.hive.ql.exec.DDLTask.execute(DDLTask.java:256)
> at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:144)
> at
org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:57)
> at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1355)
> at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1139)
> at org.apache.hadoop.hive.ql.Driver.run(Driver.java:945)
> at
org.apache.hive.service.cli.operation.SQLOperation.run(SQLOperation.java:95)
> at
org.apache.hive.service.cli.session.HiveSessionImpl.executeStatement(HiveSessionImpl.java:193)
> at
org.apache.hive.service.cli.CLIService.executeStatement(CLIService.java:148)
> at
org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:203)
> at
org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1133)
org.apache.hive.service.cli.thrift.TCLIService$Processor$ExecuteStatement.getResult(TCLIService.java:1118)
org.apache.hive.service.auth.TUGIContainingProcessor$1.run(TUGIContainingProcessor.java:40)
org.apache.hive.service.auth.TUGIContainingProcessor$1.run(TUGIContainingProcessor.java:37)
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1232)
org.apache.hadoop.hive.shims.HadoopShimsSecure.doAs(HadoopShimsSecure.java:526)
org.apache.hive.service.auth.TUGIContainingProcessor.process(TUGIContainingProcessor.java:37)
org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:206)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
'FCOMMENT' in 'field list'
this column is new in 0.12,will be auto added if you set those settings to
true

sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2119)
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2415)
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2333)
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2318)
org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
org.datanucleus.store.rdbms.SQLController.executeStatementUpdate(SQLController.java:407)
org.datanucleus.store.rdbms.scostore.RDBMSJoinListStore.internalAdd(RDBMSJoinListStore.java:313)
org.datanucleus.store.rdbms.scostore.AbstractListStore.addAll(AbstractListStore.java:136)
org.datanucleus.store.mapped.mapping.CollectionMapping.postInsert(CollectionMapping.ja