您好,欢迎访问一九零五行业门户网

基于MySQL元数据的Hive的安装和简单测试

hive是基于hadoop的一个数据仓库工具,可以将结构化的数据文件映射为一张数据库表,并提供简单的sql查询功能,可以将sql语句转换
引言: hive是一种强大的数据仓库查询语言,,类似sql,本文将介绍如何搭建hive的开发测试环境。
1. 什么是hive?
hive是基于hadoop的一个数据仓库工具,可以将结构化的数据文件映射为一张数据库表,并提供简单的sql查询功能,可以将sql语句转换为mapreduce任务进行运行。 其优点是学习成本低,可以通过类sql语句快速实现简单的mapreduce统计,不必开发专门的mapreduce应用,十分适合数据仓库的统计分析。
2.  按照hive的准备条件
2.1  hadoop集群环境已经安装完毕
 2.2 本文使用ubuntu做为开发环境(14.04)
3. 安装步骤
3.1 下载hive包:apache-hive-0.13.1-bin.tar.gz
3.2 将其解压到/opt目录下
 tar xzvf apache-hive-0.13.1-bin.tar.gz
3.3 设置环境变量
export hive_home=/opt/apache-hive-0.13
export path=$path:$hive_home/bin
export classpath=$classpath:$hive_home/bin
3.4. 修改hive-env.xml,复制hive-env.xml.template.
# set hadoop_home to point to a specific hadoop install directory
hadoop_home=/opt/hadoop-1.2.1
# hive configuration directory can be controlled by:
export hive_conf_dir=/opt/apache-hive-0.13/conf
3.5 修改hive-site.xml,主要修改数据库的连接信息.
hive.metastore.uris
  thrift://127.0.0.1:9083
  thrift uri for the remote metastore. used by metastore client to connect to remote metastore.
javax.jdo.option.connectionurl
  jdbc:mysql://bladestone-laptop:3306/hive?createdatabaseifnotexist=true
  jdbc connect string for a jdbc metastore
javax.jdo.option.connectiondrivername
  com.mysql.jdbc.driver
  driver class name for a jdbc metastore
javax.jdo.option.connectionusername
  hive
  username to use against metastore database
javax.jdo.option.connectionpassword
  123456
  password to use against metastore database
基于hadoop集群的hive安装
hive内表和外表的区别
hadoop + hive + map +reduce 集群安装部署
hive本地独立模式安装
hive学习之wordcount单词统计
3.6 安装mysql数据库
sudo apt-get install mysql-server
3.7 创建
3.8 在
更多详情见请继续阅读下一页的精彩内容:
其它类似信息

推荐信息