码迷,mamicode.com
首页 > 其他好文 > 详细

Hbase0.98.4/Hadoop2.4.1整合小结

时间:2014-08-01 18:30:52      阅读:202      评论:0      收藏:0      [点我收藏+]

标签:des   style   blog   http   color   使用   os   io   

  设定hbase的数据目录,修改conf/hbase-site.xml

<configuration>    
    <property>
        <name>hbase.cluster.distributed</name>
        <value>true</value>
        <description>The mode the clusterwill be in. Possible values are
            false: standalone and pseudo-distributedsetups with managed Zookeeper
            true: fully-distributed with unmanagedZookeeper Quorum (see hbase-env.sh)
        </description>
    </property>
    <property>
        <name>hbase.rootdir</name>
        <value>hdfs://Master:9000/hbase</value>
        <description>The directory shared byRegionServers.
        </description>
    </property>
    <property>
        <name>hbase.zookeeper.property.clientPort</name>
        <value>2222</value>
        <description>Property fromZooKeeper‘s config zoo.cfg.
        The port at which the clients willconnect.
        </description>
    </property>
    <property>
        <name>hbase.zookeeper.quorum</name>
        <value>Master</value><!--有多台就填多台主机名-->
        <description>Comma separated listof servers in the ZooKeeper Quorum.
        For example,"host1.mydomain.com,host2.mydomain.com,host3.mydomain.com".
        By default this is set to localhost forlocal and pseudo-distributed modes
        of operation. For a fully-distributedsetup, this should be set to a full
        list of ZooKeeper quorum servers. IfHBASE_MANAGES_ZK is set in hbase-env.sh
        this is the list of servers which we willstart/stop ZooKeeper on.
        </description>
    </property>
    <property>
        <name>hbase.zookeeper.property.dataDir</name>
        <value>/usr/local/hbase/zookeeper</value>
        <description>Property fromZooKeeper‘s config zoo.cfg.
        The directory where the snapshot isstored.
        </description>
    </property>
</configuration>

  修改conf/regionservers,和hadoop的slaves一样的操作,我还是要把localhost干掉的。一样的,要配多个就放多个。

Master

  替换hbase安装目录下的lib中使用的hadoop的jar包,改成一致的。

  原先hadoop相关的包为

bubuko.com,布布扣

  在hbase中lib目录下建立一个sh(省得直接用命令把杂七杂八的全部复制过来了)

find -name "hadoop*jar" | sed ‘s/2.2.0/2.4.1/g‘ | sed ‘s/.\///g‘ > f.log
rm ./hadoop*jar
cat ./f.log | while read Line
do
find /usr/local/hadoop/share/hadoop -name "$Line" | xargs -i cp {} ./
done

rm ./f.log

  完了直接启动hbase,hadoop的dfs那边会有反应了:

bubuko.com,布布扣

  剩下的随便折腾了。

Hbase0.98.4/Hadoop2.4.1整合小结,布布扣,bubuko.com

Hbase0.98.4/Hadoop2.4.1整合小结

标签:des   style   blog   http   color   使用   os   io   

原文地址:http://www.cnblogs.com/zxub/p/3885135.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!