【Hadoop】基于Hadoop/Hbase/Hive的小型离线服务器日志分析应用
5.1, Hadoop环境搭建(基本就是根据这个教程的流程来做的)http://www.powerxing.com/install-hadoop-cluster/
5.2, Hbase安装与配置
http://www.myexception.cn/internet/2034808.html
http://aperise.iteye.com/blog/2254460
http://blog.chedushi.com/archives/9747
http://blog.csdn.net/sinat_30569973/article/details/52232850
http://blog.csdn.net/yinlongfei_love/article/details/51786616
5.3, hadoop集群配置之hive1.2.0安装部署(本次实践采用远程mysql,即mysql搭建在本地,而不是在虚拟机)
http://www.mincoder.com/article/5809.shtml
http://blog.csdn.net/yingxiake/article/details/51656970
http://blog.csdn.net/thdline/article/details/51714431
http://blog.csdn.net/zhihaoma/article/details/48578589
http://www.cnblogs.com/edisonchou/p/4426096.html
需要注意的几点:
(1)找到一个叫jline-2.1.2.jar的文件,复制他,去hadoop主目录将hadoop下的三个同名但不同版本的jline替换成刚刚复制的。(原版本删除)
(2)运行元数据服务:
在主目录输入(在hive目录下而不是其bin目录下进入 )
bin/hive –service metastore
(3)运行hive server
bin/hive –service hiveserver(可能是根据版本不同,如果时比较新的hive,需要在后面的命令行后面加2)见下面的
(4)以上的hiveserver在hive1.2.1中并不会出现,官网的说法是:
HiveServer is scheduled to be removed from Hive> 5.4,hadoop,zookeeper,Hbase启动关闭顺序
(1)运行hadoop(主机上运行就可以了)
start-dfs.sh
start-yarn.sh
mr-jobhistory-daemon.sh start historyserver
(2)zookeeper运行(每个机子上面都要运行)
/usr/zookeeper-3.4.6/bin/zkServer.sh start
(3)运行Hbase(主机上运行就可以)
/usr/hbase-1.1.2/bin/start-hbase.sh
(4) 运行Hive(配置了的机子上运行)
hive –service metastore
hive –service hiveserver2
(5) 关闭Hive
直接关闭窗口,在jps命令之后可以看到runJar进程消失
(6)关闭Hbase
/usr/hbase-1.1.2/bin/stop-hbase.sh
(7)关闭zookeeper
/usr/zookeeper-3.4.6/bin/zkServer.sh stop
(8)关闭hadoop
stop-yarn.sh
stop-dfs.sh
mr-jobhistory-daemon.sh stop historyserver
5.5,Hbase和Hive整合
http://www.open-open.com/lib/view/open1414634201872.html
http://www.aboutyun.com/thread-6546-1-1.html
http://blog.csdn.net/u011523533/article/details/50480608
https://www.iteblog.com/archives/1718
http://blog.csdn.net/wulantian/article/details/38111683(这一篇理解怎么通过hive来操作Hbase)
Hbase和Hive整合问题 :
1、hbase中的空cell在hive中会补null
2、hive和hbase中不匹配的字段会补null
3、Bytes类型的数据,建hive表示加#b。cf:val#s 中的#s就表示类型为string,cf:foo没有配置类型,则采用hbase.table.default.storage.type的配置,#b为binary
页:
[1]