Thomas Friedrich created HIVE-6136:
--------------------------------------

             Summary: Hive metastore configured with DB2 LUW doesn't work
                 Key: HIVE-6136
                 URL: https://issues.apache.org/jira/browse/HIVE-6136
             Project: Hive
          Issue Type: Bug
          Components: Metastore
    Affects Versions: 0.12.0
            Reporter: Thomas Friedrich


Hive 0.12 with datanucleus 3.2.1 generates invalid SQL syntax if the metastore 
is configured with DB2.

To reproduce the issue, simply create a table and drop it using Hive CLI:
create table test(i1 int);
drop table test;

Drop will fail and this is the stacktrace:
com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-206, 
SQLSTATE=42703, SQLERRMC=SUBQ.A0.CREATE_TIME, DRIVER=4.16.53
        at com.ibm.db2.jcc.am.fd.a(fd.java:739)
        at com.ibm.db2.jcc.am.fd.a(fd.java:60)
        at com.ibm.db2.jcc.am.fd.a(fd.java:127)
        at com.ibm.db2.jcc.am.to.c(to.java:2771)
        at com.ibm.db2.jcc.am.to.d(to.java:2759)
        at com.ibm.db2.jcc.am.to.a(to.java:2192)
        at com.ibm.db2.jcc.am.uo.a(uo.java:7827)
        at com.ibm.db2.jcc.t4.ab.h(ab.java:141)
        at com.ibm.db2.jcc.t4.ab.b(ab.java:41)
        at com.ibm.db2.jcc.t4.o.a(o.java:32)
        at com.ibm.db2.jcc.t4.tb.i(tb.java:145)
        at com.ibm.db2.jcc.am.to.kb(to.java:2161)
        at com.ibm.db2.jcc.am.uo.wc(uo.java:3657)
        at com.ibm.db2.jcc.am.uo.b(uo.java:4454)
        at com.ibm.db2.jcc.am.uo.jc(uo.java:760)
        at com.ibm.db2.jcc.am.uo.executeQuery(uo.java:725)
        at 
com.jolbox.bonecp.PreparedStatementHandle.executeQuery(PreparedStatementHandle.java:172)
        at 
org.datanucleus.store.rdbms.ParamLoggingPreparedStatement.executeQuery(ParamLoggingPreparedStatement.java:381)
        at 
org.datanucleus.store.rdbms.SQLController.executeStatementQuery(SQLController.java:504)
        at 
org.datanucleus.store.rdbms.query.JDOQLQuery.performExecute(JDOQLQuery.java:637)
        at org.datanucleus.store.query.Query.executeQuery(Query.java:1786)
        at org.datanucleus.store.query.Query.executeWithArray(Query.java:1672)
        at org.datanucleus.api.jdo.JDOQuery.execute(JDOQuery.java:266)
        at 
org.apache.hadoop.hive.metastore.ObjectStore.listMPartitions(ObjectStore.java:1698)
        at 
org.apache.hadoop.hive.metastore.ObjectStore.getPartitionsInternal(ObjectStore.java:1428)
        at 
org.apache.hadoop.hive.metastore.ObjectStore.getPartitions(ObjectStore.java:1402)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:611)
        at 
org.apache.hadoop.hive.metastore.RetryingRawStore.invoke(RetryingRawStore.java:124)
        at com.sun.proxy.$Proxy7.getPartitions(Unknown Source)
        at 
org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.dropPartitionsAndGetLocations(HiveMetaStore.java:1286)
        at 
org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.drop_table_core(HiveMetaStore.java:1189)
        at 
org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.drop_table_with_environment_context(HiveMetaStore.java:1328)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.j
        at java.lang.reflect.Method.invoke(Method.java:611)
        at 
org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.
        at com.sun.proxy.$Proxy8.drop_table_with_environment_context(Unknown 
Source)
        at 
org.apache.hadoop.hive.metastore.HiveMetaStoreClient.dropTable(HiveMetaStoreCl
        at 
org.apache.hadoop.hive.metastore.HiveMetaStoreClient.dropTable(HiveMetaStoreCl
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.j
        at java.lang.reflect.Method.invoke(Method.java:611)
        at 
org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaSt
        at com.sun.proxy.$Proxy9.dropTable(Unknown Source)
        at org.apache.hadoop.hive.ql.metadata.Hive.dropTable(Hive.java:869)
        at org.apache.hadoop.hive.ql.metadata.Hive.dropTable(Hive.java:836)
        at org.apache.hadoop.hive.ql.exec.DDLTask.dropTable(DDLTask.java:3329)
        at org.apache.hadoop.hive.ql.exec.DDLTask.execute(DDLTask.java:277)
        at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:151)
        at 
org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:65)
        at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1437)
        at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1215)
        at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1043)
        at org.apache.hadoop.hive.ql.Driver.run(Driver.java:911)
        at 
org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:259)
        at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:216)
        at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:413)
        at 
org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:781)
        at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:675)
        at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:614)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.j
        at java.lang.reflect.Method.invoke(Method.java:611)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:212)

Other SQL commands like ALTER also fail.

Since this might be a bug in datanucleus itself, we also submitted a JIRA in 
datanucleus (see http://www.datanucleus.org/servlet/jira/browse/NUCRDBMS-736), 
but Hive needs to pick up a newer version of datanucleus once the problem is 
fixed:




--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to