You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Xiaobo Gu <gu...@gmail.com> on 2012/05/12 09:37:16 UTC
Where should I put JDBC drivers for metastore service
Hi,
I put mysql-connector-java-5.1.20-bin.jar into $HIVE_HOME/lib, and configurations in hive-site.xml are
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://192.168.72.1:3306/hive</value>
<description>JDBC connect string for a JDBC metastore</description>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
<description>Driver class name for a JDBC metastore</description>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>root</value>
<description>username to use against metastore database</description>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>xiaobo</value>
<description>password to use against metastore database</description>
</property>
When I execute a test HQL in hive, got the following error message:
hive> CREATE TABLE records (year STRING, temperature INT, quality INT)
> ROW FORMAT DELIMITED
> FIELDS TERMINATED BY '\t';
FAILED: Error in metadata: MetaException(message:Could not connect to meta store using any of the URIs provided)
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask
hive>
How to create index on HBase?
Posted by "ransom.hezhiqiang" <ab...@gmail.com>.
Hi all
I create index on hbase faild .
This is my sql. How to create index on HBase?
create index i_hhive on hhive(c1,c2) as "compact" with deferred rebuild STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf1:val,cf1:val2,cf1:val3") TBLPROPERTIES ("hbase.table.name" = "xyz");
Best regards
Ransom.
Best regards
Ransom.
Re: RE: Where should I put JDBC drivers for metastore service
Posted by Xiaobo Gu <gu...@gmail.com>.
I am sorry, I forget starting hadoop first, but the error messages are confusing too :)
Xiaobo Gu
From: ransom.hezhiqiang
Date: 2012-05-12 15:46
To: user@hive.apache.org; 'guxiaobo1982'
Subject: RE: Where should I put JDBC drivers for metastore service
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql:// 192.168.72.1:3306/hive?createDatabaseIfNotExist=true</value>
<description>JDBC connect string for a JDBC metastore</description>
</property>
If it doen't work, show the log in /tmp/{user.name}/hive.log
Best regards
Ransom.
-----Original Message-----
From: Xiaobo Gu [mailto:guxiaobo1982@gmail.com]
Sent: Saturday, May 12, 2012 3:37 PM
To: user
Subject: Where should I put JDBC drivers for metastore service
Hi,
I put mysql-connector-java-5.1.20-bin.jar into $HIVE_HOME/lib, and configurations in hive-site.xml are
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://192.168.72.1:3306/hive</value>
<description>JDBC connect string for a JDBC metastore</description>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
<description>Driver class name for a JDBC metastore</description>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>root</value>
<description>username to use against metastore database</description>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>xiaobo</value>
<description>password to use against metastore database</description>
</property>
When I execute a test HQL in hive, got the following error message:
hive> CREATE TABLE records (year STRING, temperature INT, quality INT)
> ROW FORMAT DELIMITED
> FIELDS TERMINATED BY '\t';
FAILED: Error in metadata: MetaException(message:Could not connect to meta store using any of the URIs provided)
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask
hive>
RE: Where should I put JDBC drivers for metastore service
Posted by "ransom.hezhiqiang" <ab...@gmail.com>.
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql:// 192.168.72.1:3306/hive?createDatabaseIfNotExist=true</value>
<description>JDBC connect string for a JDBC metastore</description>
</property>
If it doen't work, show the log in /tmp/{user.name}/hive.log
Best regards
Ransom.
-----Original Message-----
From: Xiaobo Gu [mailto:guxiaobo1982@gmail.com]
Sent: Saturday, May 12, 2012 3:37 PM
To: user
Subject: Where should I put JDBC drivers for metastore service
Hi,
I put mysql-connector-java-5.1.20-bin.jar into $HIVE_HOME/lib, and configurations in hive-site.xml are
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://192.168.72.1:3306/hive</value>
<description>JDBC connect string for a JDBC metastore</description>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
<description>Driver class name for a JDBC metastore</description>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>root</value>
<description>username to use against metastore database</description>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>xiaobo</value>
<description>password to use against metastore database</description>
</property>
When I execute a test HQL in hive, got the following error message:
hive> CREATE TABLE records (year STRING, temperature INT, quality INT)
> ROW FORMAT DELIMITED
> FIELDS TERMINATED BY '\t';
FAILED: Error in metadata: MetaException(message:Could not connect to meta store using any of the URIs provided)
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask
hive>
Re: Where should I put JDBC drivers for metastore service
Posted by Xiaobo Gu <gu...@gmail.com>.
I am uisng 0.9.0 hive against hadoop 1.0.2
Here is the error logs of metastore
gpadmin@hdp1 hive]$ more metastore_err.log
WARNING: org.apache.hadoop.metrics.jvm.EventCounter is deprecated. Please use org.apache.hadoop.log.metrics.EventCounter in all the log4j.properties files.
MetaException(message:Got exception: java.net.ConnectException Call to hdp1/127.0.0.1:8020 failed on connection exception: java.net.ConnectException: Connection refused
)
at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:785)
at org.apache.hadoop.hive.metastore.Warehouse.getFs(Warehouse.java:106)
at org.apache.hadoop.hive.metastore.Warehouse.getDnsPath(Warehouse.java:136)
at org.apache.hadoop.hive.metastore.Warehouse.getWhRoot(Warehouse.java:151)
at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.getDefaultDatabasePath(HiveMetaStore.java:475)
at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.createDefaultDB_core(HiveMetaStore.java:353)
at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.createDefaultDB(HiveMetaStore.java:371)
at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.init(HiveMetaStore.java:278)
at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.<init>(HiveMetaStore.java:248)
at org.apache.hadoop.hive.metastore.HiveMetaStore.startMetaStore(HiveMetaStore.java:3017)
at org.apache.hadoop.hive.metastore.HiveMetaStore.main(HiveMetaStore.java:2957)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
Exception in thread "main" MetaException(message:Got exception: java.net.ConnectException Call to hdp1/127.0.0.1:8020 failed on connection exception: java.net.ConnectEx
ception: Connection refused)
at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:785)
at org.apache.hadoop.hive.metastore.Warehouse.getFs(Warehouse.java:106)
at org.apache.hadoop.hive.metastore.Warehouse.getDnsPath(Warehouse.java:136)
at org.apache.hadoop.hive.metastore.Warehouse.getWhRoot(Warehouse.java:151)
at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.getDefaultDatabasePath(HiveMetaStore.java:475)
at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.createDefaultDB_core(HiveMetaStore.java:353)
at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.createDefaultDB(HiveMetaStore.java:371)
at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.init(HiveMetaStore.java:278)
at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.<init>(HiveMetaStore.java:248)
at org.apache.hadoop.hive.metastore.HiveMetaStore.startMetaStore(HiveMetaStore.java:3017)
at org.apache.hadoop.hive.metastore.HiveMetaStore.main(HiveMetaStore.java:2957)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
[gpadmin@hdp1 hive]$
Xiaobo Gu
From: Xiaobo Gu
Date: 2012-05-12 15:37
To: user
Subject: Where should I put JDBC drivers for metastore service
Hi,
I put mysql-connector-java-5.1.20-bin.jar into $HIVE_HOME/lib, and configurations in hive-site.xml are
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://192.168.72.1:3306/hive</value>
<description>JDBC connect string for a JDBC metastore</description>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
<description>Driver class name for a JDBC metastore</description>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>root</value>
<description>username to use against metastore database</description>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>xiaobo</value>
<description>password to use against metastore database</description>
</property>
When I execute a test HQL in hive, got the following error message:
hive> CREATE TABLE records (year STRING, temperature INT, quality INT)
> ROW FORMAT DELIMITED
> FIELDS TERMINATED BY '\t';
FAILED: Error in metadata: MetaException(message:Could not connect to meta store using any of the URIs provided)
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask
hive>