欢迎投稿

今日深度:

HBase,

HBase,


Hadoop 组件,运行于hdfs之上,Powerset公司

  • 行键
  • 时间戳
  • 列族
  • 表和区域
  • 单元格

伪分布式安装

下载
wget http://labfile.oss.aliyuncs.com/hbase-0.98.11-hadoop2-bin.tar.gz
解压
tar -zxvf hbase-0.98.11-hadoop2-bin.tar.gz

配置文件

hbase-site.xml

<configuration>
    <property>
        <name>hbase.rootdir</name>
        <value>hdfs://localhost:9000/hbase</value>
    </property>
    <property>
        <name>hbase.cluster.distributed</name>
        <value>true</value>
    </property>
</configuration>

hbase-env.xml

export JAVA_HOME=/usr/local/jdk1.7.0_67
export HBASE_MANAGES_ZK=true

环境变量

export HBASE_HOME=/opt/hbase
export PATH=$PATH:$HBASE_HOME/bin

启动
./start-hbase.sh

	HRegionServer
	HQuorumPeer
	HMaster

./hbase shell

	help
	exit

停止
./stop-hbase.sh

基本操作

DDL:
create 表名 列族名
list 表名
describe 表名
drop 表名 //删除表
exsists 表名 //是否存在

DML:
put //插入数据
scan //扫描数据
get //获取一行数据
disable 表名 //禁用表
enable 表名 //启动表

开发应用程序

添加hbase-site.xml

出现错误:

java.io.IOException: Attempt to start meta tracker failed.

在windows中host文件添加:
		ip hadoop

www.htsjk.Com true http://www.htsjk.com/hbase/36724.html NewsArticle HBase, Hadoop 组件,运行于hdfs之上,Powerset公司 行键 时间戳 列族 表和区域 单元格 伪分布式安装 下载 wget http://labfile.oss.aliyuncs.com/hbase-0.98.11-hadoop2-bin.tar.gz 解压 tar -zxvf hbase-0.98.11-hado...
相关文章
    暂无相关文章
评论暂时关闭