hive0.11的编译/安装/配置
一、获取hive 0.11文件
1、直接在apache网站下载release版
2、自己下载源码编译。方法:
git clone https://github.com/amplab/hive.git -b shark-0.11 git_hive-0.11_shark
cd git_hive-0.11_shark
ant package
因为我是为了后面和shark一起用,apache网站的hive经测试与shark集成有问题,所以用的是针对shark修改过的hive源码,自己编译。我使用shark时,shark针对hive o.11版的支持还有bug,还没有发布过针对hive 0.11的release版本,也需要自己编译。
shark在git上找到有两个不同公司维护的源码,因此,hive的源码地址有两个:
因为本文章是事后总结,忘了当时用的到底是哪个公司的代码。
二、在profile中设置HADOOP_HOME、HADOOP_CONF_DIR、HIVE_HOME、CLASSPATH等变量即可。
如果仅用hive+hadoop,hive仅需在master部署一份即可。
如果要用shark,每个worker节点都要部署,因为shark要用hive的lib目录下的.jar文件。
三、配置conf/hive-site.xml文件。
<configuration>
<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>
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://172.16.19.139:3306/hive_11</value>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>root</value>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>root</value>
</property>
</configuration>
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
四、启动hive:
1、hive //启动hive的cli,提供一个命令交互界面。
2、hive --service hiveserver //启动server端。用hive的jdbc包搞java开发,就要这样用。但关闭linux终端后,即不可用。
3、nohup hive --service hiveserver //关于linux终端后,hive server在后台运行。
五、hive测试:
show tables;
create table lam01(id int, name string);
select * from lam01;
六、其它
查看hive文件:hadoop fs -ls -R /user/hive
七、安装过程中的错误记录
错误3:
MetaException(message:file:/user/hive/warehouse/xxxx is not a directory or unable to create one)
解决:CLASSPATH中加入HADOOP_CONF_DIR
错误2:
Error in metadata: MetaException(message:Got exception: org.apache.hadoop.hive.metastore.api.MetaException javax.jdo.JDODataStoreException: An exception was thrown while adding/validating class(es) : Specified key was too long; max key length is 767 bytes
解决:
只要修改MySQL中Hive元数据库MetaStore的字符集便可。
alter database dbname character set latin1;
错误1:
java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient。
解决:在CLASSPATH中要有mysql的jdbc驱动。
编译错误:
mvn-init:
[echo] hcatalog-core
BUILD FAILED
/home/hadoop/git_hive-0.11_shark/build.xml:274: The following error occurred while executing this line:
/home/hadoop/git_hive-0.11_shark/build.xml:113: The following error occurred while executing this line:
/home/hadoop/git_hive-0.11_shark/build.xml:115: The following error occurred while executing this line:
/home/hadoop/git_hive-0.11_shark/hcatalog/build.xml:65: The following error occurred while executing this line:
/home/hadoop/git_hive-0.11_shark/hcatalog/build-support/ant/deploy.xml:77: get doesn't support the "skipexisting" attribute
解决:找到对应的.xml文件行,好像是去掉skipexisting属性。好像报了2次错误,因为还有另一个文件也是这个问题,依次解决就行了。
hive0.11的编译/安装/配置的更多相关文章
- Valgrind 3.11.0编译安装
Valgrind 3.11.0编译安装 Valgrind是一款用于内存调试.内存泄漏检测以及性能分析的软件开发工具. Valgrind遵守GNU通用公共许可证条款,是一款自由软件. 到3.3.0版本为 ...
- haproxy1.7编译安装配置
#haproxy1.7编译安装配置#高可用.负载均衡 使用 #haproxy1.7编译安装配置 #centos7 x86_64 #高可用.负载均衡 使用 #下载 #http://www.haproxy ...
- azkaban编译安装配置文档
azkaban编译安装配置文档 参考官方文档: http://azkaban.github.io/azkaban/docs/latest/ azkaban的配置文件说明:http://azkaban. ...
- Visual Studio 2015编译安装配置QT5.5.1(含QTWEBKIT)
尽管QT5.5.1和VisualStudio 2015都已经发布很久了,但是QT项目组视乎不会为QT5.5.1专门发布预编译的QT5.5.1 for windows(2015)版本的,也不会专门发布V ...
- cloudera impala编译 安装 配置 启动
无论是采用GDB调试impala或者尝试修改impala源码,前提都是需要本地环境编译impala,这篇文章详细的分享一下impala编译方法以及编译过程遇到的棘手的问题: 前言: impala官方的 ...
- blfs(systemd版本)学习笔记-编译安装配置dhcpcd
我的邮箱地址:zytrenren@163.com欢迎大家交流学习纠错! dhcpcd项目地址:http://www.linuxfromscratch.org/blfs/view/stable-syst ...
- blfs(systemv版本)学习笔记-编译安装配置dhcpcd
我的邮箱地址:zytrenren@163.com欢迎大家交流学习纠错! dhcpcd项目地址:http://www.linuxfromscratch.org/blfs/view/8.3/basicne ...
- heartbeat 编译安装配置
一.heartbeat介绍 heartbeat是HA高可用集群的一个重要组件,heartbeat实现了资源转移和心跳信息传递.它的常用组合方式为heartbeat v1,heartbeat v2+cr ...
- CentOS 7.4下源码编译安装配置LAMP环境详解
CentOS 7.4搭建LAMP,LAMP:Linux.Apache.MySQL.PHP. 目录:第一部分 准备工作第二部分 安装Apache服务第三部分 安装MySQL服务第四部分 搭建PHP运行环 ...
随机推荐
- SQL注入原理一
SQL注入的成因 所谓SQL注入,就是通过把SQL命令插入到Web表单提交.页面请求的查询字符串,最终达到欺骗服务器执行恶意的SQL命令.根据所注入对象的类型不同,SQL注入分为三类: (1) 变量是 ...
- ubuntu u盘安装
参考博客:http://www.bjwilly.com/archives/325.html 1.下载光盘映像 目前可选12.04LTS(长期支持版本) http://www.ubuntu.org.cn ...
- uva 12654
dp,用优先队列存,上个节点节点覆盖下来的长度: 不过还不是很明白: #include<cstdio> #include<queue> #include<algorith ...
- zepto源码学习-06 touch
先上菜,看这个模块的最后一段代码,一看就明白. ['swipe', 'swipeLeft', 'swipeRight', 'swipeUp', 'swipeDown', 'doubleTap', 't ...
- unity 嵌入 百度分享 与 游戏内购物 iap
原地址:http://blog.csdn.net/u012085988/article/details/18268869 最近老板让在unity项目里实现分享与内购功能,还要ios和android两个 ...
- Codeforces Round #236 (Div. 2)
A. Nuts time limit per test:1 secondmemory limit per test:256 megabytesinput:standard inputoutput:st ...
- android 自定义按钮的外边框
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http: ...
- Android MediaStore与Media.EXTERNAL_CONTENT_URI
MediaStore这个类是Android系统提供的一个多媒体数据库,android中多媒体信息都可以从这里提取.这个MediaStore包括了多媒体数据库的所有信息,包括音频,视频和图像,andro ...
- ruby使用IO类读写文件
path="test.txt" port=open(path) begin port.each_line{|line| p line.to_s } ensure port.clos ...
- wcf教程
WCF Tutorial WCF stands for Windows Communication Foundation. It is a framework for building, config ...