hbase 环境搭建

Hbase 环境搭建

Hbase 单机模式(Standalone )

官网下载 hbase 包

解压到指定目录

$ tar xzvf hbase-3.0.0-SNAPSHOT-bin.tar.gz

$ cd hbase-3.0.0-SNAPSHOT

 

在conf目录下

配置文件如下

配置hbase-env.sh中配置  JAVA_HOME

配置 hbase-site.xml

<configuration>

  <property>

    <name>hbase.rootdir</name>

    <value>file:///usr/local/software/tmp/hbase</value>

  </property>

  <property>

    <name>hbase.zookeeper.property.dataDir</name>

    <value>/usr/local/software/tmp/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>

 

启动 bin 目录

启动服务  start-hbase.sh

关闭服务  stop-hbase.sh

 

Hbase 集群模式

配置hbase-env.sh中配置JAVA_HOME和export HBASE_MANAGES_ZK=false

配置hbase-site.xml

<property>

<name>hbase.rootdir</name>

<value>hdfs://chenkl/hbase</value>

</property>

<property>

<name>hbase.cluster.distributed</name>

<value>true</value>

</property>

<property>

<name>hbase.zookeeper.quorum</name>

<value>node1,node2,node3</value>

</property>

配置reginservers,数据节点

vim reginservers

$ node1

$ node2

$ node3

在hbase-env.sh配置 export HBASE_CLASSPATH=/home/hadoop-2.5.1/etc/hadoop/,这里是hadoop配置文件的路径

配置完成,分发到其他节点

需要的话配置环境变量

 

集群验证: http://node1:16010/master-status

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值