Hbase 0.98.3 for Hadoop2 II(Based on Hdfs)

运行环境:

jdk1.7.0

Ubuntu 14.0.4

Hadoop 2.4.0

Hbase 0.98.3 for Hadoop2

Zookeeper 3.4.6


登录为root帐号。

"Apache HBase uses the same configuration system as Apache Hadoop"

"When running in distributed mode, after you make an edit to an HBase configuration, make sure you copy the content of the conf directory to all nodes of the cluster. HBase will not do this for you. Use rsync."


1. 因为用的ubuntu,所以需要做如下修改:

    1.1 In the file /etc/security/limits.conf add a line like:

    hadoop  -       nofile  32768
    hadoop soft/hard nproc 32000

     

    1.2 打开/etc/pam.d/common-session文件,在最后一行添加

   

    否则我们上一步的修改无法生效!(in /etc/security/limits.conf

    退出重新登录终端让我们新设置的配置生效!


2. Hadoop本身的lib文件夹中是有hbase的,但那个只支持单节点操作!所以需要把Hbase的lib文件夹中所有自带的hadoop jar包给替换掉【更重要的是,把里面的jar包换成我们使用的hadoop的版本可以防止版本冲突所带来的问题!版本冲突带来的问题多种多样,但是大部分情况下它的表现都是挂起死机。】

   

hadoop的jar包在hadoop文件夹下的share文件中。


3. 进入hadoop的conf/hdfs-site.xml文件

添加如下语句:


它指定了任何时候hdfs处理的文件数量上限。


 

" In standalone mode, HBase does not use HDFS -- it uses the local filesystem instead -- and it runs all HBase daemons and a local ZooKeeper all up in the same JVM. Zookeeper binds to a well known port so clients may talk to HBase."

"Distributed mode can be subdivided into distributed but all daemons run on a single node -- a.k.a pseudo-distributed-- and fully-distributed where the daemons are spread across all nodes in the cluster"


4. 在Hbase的分布式模式中,又有伪分布和全分布的差别,因为我只用了一台机器,所以我就使用伪分布式的hbase。先进入conf/hbase-site.xml文件,添加如下内容:

这样配置后,Hbase将会启动Master,zookeeper server,regionserver 进程,会将文件写入你本地文件系统的tmp文件夹下hbase-YOUR_USER_NAME,所以这样的配置也只是暂时的。
尤其需要注意的是,需要在conf/hbase-env.sh文件中修改JAVA_HOME的路径!否则会因为找不到jdk而无法启动。

之后直接运start-hbase.sh即可。

HBase logs can be found in the logs subdirectory.

呃。不过这样配置出来感觉有点问题。准备再研究下hadoop与hbase的关系再更。

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值