首页 > 其他 > 详细

hive0.13安装

时间:2014-05-09 00:51:13      阅读:492      评论:0      收藏:0      [点我收藏+]

1.COPY配置文件:

cp hive-default.xml.template hive-site.xml

cp hive-env.sh.template hive-env.sh

cp hive-exec-log4j.properties.template hive-exec-log4j.properties

cp hive-log4j.properties.template hive-log4j.properties


2.配置HADOOP主目录:

vim hive-env.sh

HADOOP_HOME=/usr/app/hdp/hadoop


3.配置数据库(我用的mysql):

vim hive-site.sh

<property>

 <name>javax.jdo.option.ConnectionURL</name>

 <value>jdbc:mysql://192.168.1.120:3306/test?createDatabaseIfNotExist=true</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>123456</value>

 <description>password to use against metastore database</description>

</property>


4.mysql官网下载连接库到lib下


5.连接hive测试:

./bin/hive

14/05/02 04:42:19 WARN conf.HiveConf: DEPRECATED: hive.metastore.ds.retry.* no longer has any effect.  Use hive.hmshandler.retry.* instead


Logging initialized using configuration in file:/usr/app/hive/conf/hive-log4j.properties

hive>


6.建个表试试:

hive> create table test1(id int,name string);

OK

Time taken: 1.686 seconds



hive0.13安装,布布扣,bubuko.com

hive0.13安装

原文:http://xiaofengge315.blog.51cto.com/405835/1408486

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!