[ 
https://issues.apache.org/jira/browse/HIVE-5428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Shelukhin updated HIVE-5428:
-----------------------------------

    Attachment: HIVE-5428.01.patch

> Direct SQL check fails during tests
> -----------------------------------
>
>                 Key: HIVE-5428
>                 URL: https://issues.apache.org/jira/browse/HIVE-5428
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Brock Noland
>         Attachments: D13245.1.patch, HIVE-5428.01.patch
>
>
> Noticed this while work on mavenization. If you run the following command
> {noformat}
> ant test -Dtestcase=TestCliDriver -Dqfile=udf_case.q -Dtest.silent=false
> {noformat}
> and look at the top of the logs you see the exception below. It looks like 
> something needs to be changed in the initialization order.
> {noformat}
> 2013-10-02 13:42:21,596 INFO  metastore.ObjectStore 
> (ObjectStore.java:initialize(243)) - ObjectStore, initialize called
> 2013-10-02 13:42:22,048 DEBUG bonecp.BoneCPDataSource 
> (BoneCPDataSource.java:maybeInit(148)) - JDBC URL = 
> jdbc:derby:;databaseName=../build/test/junit_metastore_db;create=true, 
> Username = APP, partitions = 1, max (per partition) = 0, min (per partition) 
> = 0, helper threads = 3, idle max age = 60 min, idle test period = 240 min
> 2013-10-02 13:42:22,051 WARN  bonecp.BoneCPConfig 
> (BoneCPConfig.java:sanitize(1537)) - Max Connections < 1. Setting to 20
> 2013-10-02 13:42:30,218 INFO  metastore.ObjectStore 
> (ObjectStore.java:getPMF(312)) - Setting MetaStore object pin classes with 
> hive.metastore.cache.pinobjtypes="Table,StorageDescriptor,SerDeInfo,Partition,Database,Type,FieldSchema,Order"
> 2013-10-02 13:42:30,253 DEBUG bonecp.BoneCPDataSource 
> (BoneCPDataSource.java:maybeInit(148)) - JDBC URL = 
> jdbc:derby:;databaseName=../build/test/junit_metastore_db;create=true, 
> Username = APP, partitions = 1, max (per partition) = 0, min (per partition) 
> = 0, helper threads = 3, idle max age = 60 min, idle test period = 240 min
> 2013-10-02 13:42:30,253 WARN  bonecp.BoneCPConfig 
> (BoneCPConfig.java:sanitize(1537)) - Max Connections < 1. Setting to 20
> 2013-10-02 13:42:30,262 INFO  metastore.MetaStoreDirectSql 
> (MetaStoreDirectSql.java:<init>(99)) - MySQL check failed, assuming we are 
> not on mysql: Lexical error at line 1, column 5.  Encountered: "@" (64), 
> after : "".
> 2013-10-02 13:42:30,298 ERROR metastore.MetaStoreDirectSql 
> (MetaStoreDirectSql.java:<init>(112)) - Self-test query [select "DB_ID" from 
> "DBS"] failed; direct SQL is disabled
> javax.jdo.JDODataStoreException: Error executing SQL query "select "DB_ID" 
> from "DBS"".
>   at 
> org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:451)
>   at org.datanucleus.api.jdo.JDOQuery.execute(JDOQuery.java:230)
>   at 
> org.apache.hadoop.hive.metastore.MetaStoreDirectSql.<init>(MetaStoreDirectSql.java:108)
>   at 
> org.apache.hadoop.hive.metastore.ObjectStore.initialize(ObjectStore.java:249)
>   at 
> org.apache.hadoop.hive.metastore.ObjectStore.setConf(ObjectStore.java:220)
>   at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:62)
>   at 
> org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:117)
>   at 
> org.apache.hadoop.hive.metastore.RetryingRawStore.<init>(RetryingRawStore.java:62)
>   at 
> org.apache.hadoop.hive.metastore.RetryingRawStore.getProxy(RetryingRawStore.java:71)
>   at 
> org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.newRawStore(HiveMetaStore.java:418)
>   at 
> org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.getMS(HiveMetaStore.java:405)
>   at 
> org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.createDefaultDB(HiveMetaStore.java:444)
>   at 
> org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.init(HiveMetaStore.java:329)
>   at 
> org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.<init>(HiveMetaStore.java:289)
>   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:4084)
>   at 
> org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:126)
>   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:1211)
>   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:2404)
>   at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:2415)
>   at org.apache.hadoop.hive.ql.metadata.Hive.dropTable(Hive.java:871)
>   at org.apache.hadoop.hive.ql.metadata.Hive.dropTable(Hive.java:853)
>   at org.apache.hadoop.hive.ql.QTestUtil.cleanUp(QTestUtil.java:534)
>   at org.apache.hadoop.hive.cli.TestCliDriver.<clinit>(TestCliDriver.java:44)
>   at java.lang.Class.forName0(Native Method)
>   at java.lang.Class.forName(Class.java:190)
>   at 
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:374)
>   at 
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1060)
>   at 
> org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:911)
> NestedThrowablesStackTrace:
> java.sql.SQLSyntaxErrorException: Table/View 'DBS' does not exist.
>   at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown 
> Source)
>   at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
>   at 
> org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown 
> Source)
>   at 
> org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown 
> Source)
>   at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown 
> Source)
>   at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown 
> Source)
>   at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
>   at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown 
> Source)
>   at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown 
> Source)
>   at org.apache.derby.impl.jdbc.EmbedPreparedStatement40.<init>(Unknown 
> Source)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to