Apache HBase™ is the Hadoop database, a distributed, scalable, big data store.
Use Apache HBase™ when you need random, realtime read/write access to your Big Data. This project's goal is the hosting of very large tables -- billions of rows X millions of columns -- atop clusters of commodity hardware. Apache HBase is an open-source, distributed, versioned, non-relational database modeled after Google's Bigtable: A Distributed Storage System for Structured Data by Chang et al. Just as Bigtable leverages the distributed data storage provided by the Google File System, Apache HBase provides Bigtable-like capabilities on top of Hadoop and HDFS.
hbase-2.2.2-bin.tar.gz下载:
链接:https://pan.baidu.com/s/1CMkh8EoAICNg0_Nxomw51A
提取码:rjxy
修改HBASE配置文件
1、hbase-env.sh
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.302.b08-0.el7_9.x86_64
export HBASE_MANAGES_ZK=false
2、hbase-site.xml
<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://192.168.75.132:9000/hbase</value>
<!--<value>hdfs://hadoop.master01:9000/hbase</value>-->
</property>
<!-- 指定hbase集群为分布式集群 -->
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<!-- 指定zookeeper集群,有多个用英文逗号分隔 -->
<property>
<name>hbase.zookeeper.quorum</name>
</property>
<!-- 备份的副本数(不会放在同一节点上),不能超过datanode的节点数。
<property>
<name>dfs.replication</name>
<value>3</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<!-- 指定HBase Master web页面访问端口,默认端口号16010 -->
<property>
<name>hbase.master.info.port</name>
<!-- 指定HBase RegionServer web页面访问端口,默认端口号16030 -->
<property>
<name>hbase.regionserver.info.port</name>
<value>16030</value>
</property>
<!-- 解决启动HMaster无法初始化WAL的问题 -->
<property>
<name>hbase.unsafe.stream.capability.enforce</name>
<value>false</value>
</property>
<!--因Master is initializing报错添加-->
<property>
<name>hbase.wal.provider</name>
<value>filesystem</value>
</property>
<!-- 建立二级索引,将业务需要的数据联立建立索引,方便查询 -->
<property>
<name>hbase.regionserver.wal.codec</name>
</property>
<!-- 如果使用了 hbase 中的自定义 namespace,不仅仅使用default -->
<!-- 那么在phoenix中与之对应的是schema的概念,但是默认并没有开启,需要在增>加以下配置项 -->
<property>
<name>phoenix.schema.isNamespaceMappingEnabled</name>
<value>true</value>
</property>
<property>
<name>phoenix.schema.mapSystemTablesToNamespace</name>
<value>true</value>
</property>
<!-- 用户可以创建临时或永久的用户自定义函数。 -->
<!-- 这些用户自定义函数可以像内置的create、upsert、delete一样被调用 -->
<property>
<name>phoenix.functions.allowUserDefinedFunctions</name>
<value>true</value>
<description>enable UDF functions</description>
</property>
<property>
<name>hbase.coprocessor.abortonerror</name>
<value>false</value>
</property>
</configuration>
3、regionservers

拷贝到其他节点:
scp -r /usr/local/hbase-2.2.2 slave1:/usr/local/hbase-2.2.2/
启动:bin目录下
./start-hbase.sh
shell命令操作:hbase shell


881

被折叠的 条评论
为什么被折叠?



