zoukankan      html  css  js  c++  java
  • HBase的下载、安装与配置

    声明:作者原创,转载注明出处。

    作者:帅气陈吃苹果

    (一)安装

    下载、解压:

    wget http://mirror.bit.edu.cn/apache/hbase/1.3.1/hbase-1.3.1-bin.tar.gz
    
    tar -zxvf hbase-1.3.1.tar.gz -C /root/hadoop/
    

    (二)配置

    cd $HBASE_HOME/conf
    
    
    vim hbase-site.xml
    1)单机模式
    <!-- 指定HRegion服务器的位置,即数据存放位置  -->
    <property>
        <name>hbase.rootdir</name>
        <value>file:///tmp/hbase-${user.name}/hbase</value>
    </property>
    
    2)伪分布式模式
    <!-- 指定HRegion服务器的位置,即数据存放位置  -->
    <property>
        <name>hbase.rootdir</name>
        <value>hdfs://localhost:9000/hbase</value>
    </property>
    <!-- 指定HLog和Hfile的副本个数  -->
    <property>
        <name>dfs.replication</name>
        <value>1</value>
    </property>
    
    3)完全分布式模式
    <!--  指定HRegion服务器的位置,即数据存放位置 -->
    <property>
        <name>hbase.rootdir</name>
        <value>hdfs://master:9000/hbase</value>
    </property>
    <!-- 指定HBase运行模式,false表示单机模式或伪分布式,true表示完全分布式模式  -->
    <property>
        <name>hbase.clister.distributed</name>
        <value>true</value>
    </property>
    <!-- 指定master位置  -->
    <property>
        <name>hbase.master</name>
        <value>hdfs://master:60000</value>
    </property>
    <!--  指定zookeeper集群 -->
    <property>
        <name>hbase.zookeeper.quorum</name>
        <value>master,slave1,slave2</value>
    </property>
    

    (三)运行

    cd $HBASE_HOME/bin

    1)单机模式
    start-hbase.sh
    
    2)伪分布式模式
    start-dfs.sh
    
    start-hbase.sh
    
    3)完全分布式模式
    start-dfs.sh
    
    zookeeper.sh start
    
    start-hbase.sh
    
    

    最后,欢迎指正。喜欢的话,点个赞呗,请你吃苹果。

  • 相关阅读:
    Event-Driven Architecture思考
    Kafka分区分配策略分析——重点:StickyAssignor
    Ubiq:A Scalable and Fault-tolerant Log Processing Infrastructure
    11张PPT介绍Paxos协议
    译《The Part-Time Parliament》——终于读懂了Paxos协议!
    谈谈分布式系统的一致性
    Pulsar Consumer实现介绍
    Pulsar-Producer实现简介
    RocketMQ事务消息实现分析
    Apache Pulsar简介
  • 原文地址:https://www.cnblogs.com/sqchen/p/8080914.html
Copyright © 2011-2022 走看看