Below property is not needed. Keep that to default value. (Also, you can
create hive-site.xml and leave the hive-default.xml as it is)
<property>
<name>hive.metastore.uris</name>
<value>jdbc:derby://nyhadoop1:1527/metastore_db</value>
<description>Comma separated list of URIs of metastore servers. The
first server that can be connected to will be used.</description>
</property>
Set local to true.
<property>
<name>hive.metastore.local</name>
<value>true</value>
<description>controls whether to connect to remove metastore server
or open a new metastore server in Hive Client JVM</description>
</property>
If you are still getting error, check the logs (/tmp/${USER}/hive.log). In
conf directory there is hive-log4j.properties where you can control the
logging level.
Prasad
From: Edward Capriolo <[EMAIL PROTECTED]>
Reply-To: <[email protected]>
Date: Thu, 2 Oct 2008 12:33:20 -0700
To: <[email protected]>
Subject: Re: Hive questions about the meta db
I am doing a lot of testing with Hive, I will be sure to add this
information to the wiki once I get it going.
Thus far I downloaded the same version of derby that hive uses. I have
verified that the connections is up and running.
ij version 10.4
ij> connect 'jdbc:derby://nyhadoop1:1527/metastore_db;create=true';
ij> show tables
TABLE_SCHEM |TABLE_NAME |REMARKS
------------------------------------------------------------------------
SYS |SYSALIASES |
SYS |SYSCHECKS |
...
vi hive-default.conf
...
<property>
<name>hive.metastore.local</name>
<value>false</value>
<description>controls whether to connect to remove metastore server
or open a new metastore server in Hive Client JVM</description>
</property>
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:derby://nyhadoop1:1527/metastore_db;create=true</value>
<description>JDBC connect string for a JDBC metastore</description>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>org.apache.derby.jdbc.ClientDriver</value>
<description>Driver class name for a JDBC metastore</description>
</property>
<property>
<name>hive.metastore.uris</name>
<value>jdbc:derby://nyhadoop1:1527/metastore_db</value>
<description>Comma separated list of URIs of metastore servers. The
first server that can be connected to will be used.</description>
</property>
...
javax.jdo.PersistenceManagerFactoryClass=org.jpox.PersistenceManagerFactoryI
mpl
org.jpox.autoCreateSchema=false
org.jpox.validateTables=false
org.jpox.validateColumns=false
org.jpox.validateConstraints=false
org.jpox.storeManagerType=rdbms
org.jpox.autoCreateSchema=true
org.jpox.autoStartMechanismMode=checked
org.jpox.transactionIsolation=read_committed
javax.jdo.option.DetachAllOnCommit=true
javax.jdo.option.NontransactionalRead=true
javax.jdo.option.ConnectionDriverName=org.apache.derby.jdbc.ClientDriver
javax.jdo.option.ConnectionURL=jdbc:derby://nyhadoop1:1527/metastore_db;crea
te=true
javax.jdo.option.ConnectionUserName=
javax.jdo.option.ConnectionPassword=
hive> show tables;
08/10/02 15:17:12 INFO hive.metastore: Trying to connect to metastore
with URI jdbc:derby://nyhadoop1:1527/metastore_db
FAILED: Error in semantic analysis: java.lang.NullPointerException
08/10/02 15:17:12 ERROR ql.Driver: FAILED: Error in semantic analysis:
java.lang.NullPointerException
I must have a setting wrong. Any ideas?