1、快速开始hbase
解压hbase
[root@hadoop04 hbase]# tar -zxvf hbase-0.98.17-hadoop2-bin.tar.gz
找到配置文件 conf/hbase-env.sh
1、 修改
# The java implementation to use. Java 1.6 required.
export JAVA_HOME=/opt/java/jdk1.8.0_181
2、使用使用外部的集群zk。
# Tell HBase whether it should manage it's own instance of Zookeeper or not.
export HBASE_MANAGES_ZK=false
3、找到conf/hbase-site.xml
1、配置hbase的hdfs地址。
<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://hadoop01.fandong.com:9001/hbase</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>hadoop01.fandong.com:2184,hadoop01.fandong.com:2183,hadoop01.fandong.com:2182</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/usr/pseudo_zookeeper</value>
</property>
<property>
<name>hbase.unsafe.stream.capability.enforce</name>
<value>false</value>
<description>
Controls whether HBase will check for stream capabilities (hflush/hsync).
Disable this if you intend to run on LocalFileSystem, denoted by a rootdir
with the 'file://' scheme, but be mindful of the NOTE below.
WARNING: Setting this to false blinds you to potential data loss and
inconsistent system state in the event of process and/or node failures. If
HBase is complaining of an inability to use hsync or hflush it's most
likely not a false positive.
</description>
</property>
</configuration>
4、启动bin/start-hbase.sh 一个独立的hbase就搭建OK了。
5、 web ui 界面端口 60010
6、 查看hadoop 中hbase下目录
[root@hadoop01 bin]# hadoop fs -ls /
Found 4 items
drwxr-xr-x - dr.who supergroup 0 2019-11-25 21:49 /hadoop04
drwxr-xr-x - root supergroup 0 2019-11-25 20:53 /hbase
drwxrwxrwx - root supergroup 0 2019-11-11 21:41 /tmp
drwxr-xr-x - root supergroup 0 2019-10-26 11:23 /user
[root@hadoop01 bin]# hadoop fs -ls /hbase
Found 6 items
drwxr-xr-x - root supergroup 0 2019-11-25 20:53 /hbase/.tmp
drwxr-xr-x - root supergroup 0 2019-11-25 20:53 /hbase/WALs
drwxr-xr-x - root supergroup 0 2019-11-25 20:41 /hbase/data
-rw-r--r-- 1 root supergroup 42 2019-11-25 20:40 /hbase/hbase.id
-rw-r--r-- 1 root supergroup 7 2019-11-25 20:40 /hbase/hbase.version
drwxr-xr-x - root supergroup 0 2019-11-25 22:04 /hbase/oldWALs
[root@hadoop01 bin]#
可以发现已经创建成功了。