Hbase 流水笔记一

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]# 

可以发现已经创建成功了。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值