hbase安装配置
来源:互联网 发布:65535端口 编辑:程序博客网 时间:2024/06/03 10:31
1 安装HBase,有条件的同学都按完全分布式安装,将安装过程和最后测试成功的界面抓图提交
1、 去apache下载hbase-0.94.16.tar.gz
2、 解压缩到
[hadoop@hadoop4 ~]$ tar zxvf hbase-0.94.16.tar.gz
3、[hadoop@hadoop4 conf]$ vihbase-site.xml
4、配置regionservers
[hadoop@hadoop4 conf]$ vi regionservers
hadoop5
hadoop6
5、配置vi /etc/profile
exportHBASE_HOME=/home/hadoop/hbase-0.94.16
exportPATH=$HBASE_HOME/bin:/opt/mysql5168/bin:$JAVA_HOME/bin:$HADOOP_HOME/bin:$PATH:$HIVE_HOME/bin:/home/hadoop/pig-0.12.0/bin:$MAHOUT_HOME/bin:$MAHOUT_HOME/conf
6、复制
cp –f /home/hadoop/hadoop-core-1.2.1.jar/home/hadoop/hbase-0.94.16/lib/
cd/home/hadoop/hbase-0.94.16/lib
rm -f hadoop-core-1.0.4.jar
scp -rhbase-0.94.16 hadoop@hadoop5:/home/hadoop/
scp -rhbase-0.94.16 hadoop@hadoop6:/home/hadoop/
7、启动hbase
[hadoop@hadoop4bin]$ start-hbase.sh
验证结果:
http://192.168.2.222:60030/regionserver.jsp
http://192.168.12.121:60010/zk.jsp
2 用HBase存储社交网站站内短信信息,要求记录发送者,接受者,时间,内容,有关的查询是发送者可以列出他所有(或按时间段)发出的信息列表(按时间降序排列),接收者可以列出他所有(或按时间段)收到的信息列表(按时间降序排列)。请进行数据建模。
构建两张表:
第一张:sender_t 以 senderid+sendtime 为row key,info为列簇,列为:senderid,receiveid,message,sendtime
第二张:receiver_t 以receiverid+receivetime为row key ,info为列簇,列为
senderid,Receiverid,message,receivetime
降序排列rowkey的设计方案为:
Long.MAX_VALUE -<date-as-long>
hbase(main):016:0>create 'sender_t', 'info'
0 row(s) in1.1070 seconds
hbase(main):009:0>put 'sender_t','lxh_20140225','info:senderid','001'
0 row(s) in0.0800 seconds
hbase(main):010:0>put 'sender_t','lxh_20140225', 'info:receiveid','005'
0 row(s) in0.0230 seconds
hbase(main):011:0>put 'sender_t','lxh_20140225', 'info:message','hello',
hbase(main):013:0>put 'sender_t','lxh_20140225', 'info:message','hello'
0 row(s) in0.0210 seconds
hbase(main):014:0>put 'sender_t','lxh_20140225', 'info:sendtime','20140225'
0 row(s) in0.0300 seconds
hbase(main):015:0>put 'sender_t','lxh1_20140226','info:senderid','002'
0 row(s) in0.0170 seconds
hbase(main):016:0>put 'sender_t','lxh1_20140226', 'info:receiveid','006'
0 row(s) in0.0170 seconds
hbase(main):017:0>put 'sender_t','lxh1_20140226', 'info:message','hello006'
0 row(s) in0.0180 seconds
hbase(main):018:0>put 'sender_t','lxh1_20140226', 'info:sendtime','20140226'
0 row(s) in0.0210 seconds
hbase(main):056:0>put 'sender_t','lxh_20140226','info:senderid','001'
0 row(s) in0.0170 seconds
hbase(main):057:0>put 'sender_t','lxh_20140226', 'info:receiveid','005'
0 row(s) in0.0160 seconds
hbase(main):058:0>put 'sender_t','lxh_20140226', 'info:message','hello'
0 row(s) in0.0170 seconds
hbase(main):059:0>put 'sender_t','lxh_20140226', 'info:sendtime','20140226'
0 row(s) in0.0150 seconds
hbase(main):017:0>create 'receiver_t', 'info'
0row(s) in 1.1100 seconds
- hbase安装与配置
- Hbase集群安装配置
- HBase安装与配置
- Hbase安装配置
- Hadoop+HBase 安装配置
- HBASE基本安装配置
- hbase安装配置
- HBase配置安装
- Hadoop+HBase 安装配置
- hbase安装配置
- HBase安装配置
- hbase安装配置
- hbase安装配置
- Hadoop+HBase 安装配置
- Hadoop+HBase 安装配置
- Hbase安装与配置
- hbase安装及配置
- HBase集群安装配置
- IOS开发(一)真机调试
- C#(一)-抽象类与接口
- 分析多线程并发写HashMap线程被hang住的原因
- timerfd使用总结
- 需要先排序的DP-----划分土地
- hbase安装配置
- jquery跨域访问解决方案
- 代替jquery $.post 跨域提交数据的N种形式代替jquery $.post 跨域提交数据的N种形式
- requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()
- hadoop安装
- 制作简单的日期选择的下拉菜单
- iOS-响应上下左右滑动手势
- Maximum Subarray
- hdu 4734 F(x) (数位dp)