数据模型
HBase = List [
Namespace = List[
Table =
Map<RowKey, Map<ColumnFamily, Map<ColumnQualifier, Map<Version,Data>>>>
Namespace: HBase的命名空间,Table逻辑上的组织形式,可以整体授权、绑定RegionServer等。默认有hbase/default两个命名空间。hbase存放系统表(如meta表),default则是用户默认命名空间。
Table: HBase表是一个巨大的哈希表。
整体架构
HMaster
安装
步骤
- 下载 hbase tgz包,解压;
- 在hmaster节点,配置 conf/regionservers和conf/backup-masters,两个文件的内容都是ip/主机名,一行一个
- ./bin/start-hbase.sh 和 ./bin/stop-hbase.sh
- 访问hmaser的UI: http://mt1:60010/master-status
使用单独的zookeeper
需要配置 conf/hbase-env.sh:export HBASE_MANAGES_ZK=false
hbase-site.xml 参考
http://hbase.apache.org/book.html#hbase_default_configurations
<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://mt1:8020/hbase</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.zookeeper.quorum</