• 1.配置文件内容


    单机模式 部署
    创建目录
    sudo mkdir /home/briup/software/data/hbase/logs

    sudo chown hbase:hadoop /home/briup/software/data/hbase/logs

    1 解压后 进入 hbase-2.0.1/conf 目录 修改 hbase-env.sh
    修改第一行,加入第二行
    export JAVA_HOME=/home/briup/software/jdk
    export HBASE_MANAGES_ZK=true
    export HBASE_LOG_DIR=/home/briup/software/data/hbase/logs


    2 修改 hbase-2.0.1/conf/hbase-site.xml
    加入以下内容
    <configuration>
    <property>
    <name>hbase.rootdir</name>
    <value>file:///home/briup/software/data/hbase/hbase_data</value>
    </property>
    <property>
    <name>hbase.zookeeper.property.dataDir</name>
    <value>/home/briup/software/data/hbase/zk_data</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>


    ----------------------------------


    全分布式 部署
    创建目录
    sudo mkdir /data/hbase/logs

    ?????
    sudo chown hbase:hadoop /data/hbase/logs

    1 解压后 进入 hbase-2.0.1/conf 目录 修改 hbase-env.sh
    修改第一行,加入第二 三行
    sudo vi /opt/hbase/conf/hbase-env.sh

    export JAVA_HOME=/opt/jdk
    export HBASE_MANAGES_ZK=false
    export HBASE_LOG_DIR=/data/hbase/logs
    export HBASE_PID_DIR=/home/hbase/pids


    ????
    export HBASE_PID_DIR=/home/hbase/pids

    2 修改 hbase-2.0.1/conf/hbase-site.xml
    sudo vi /opt/hbase/conf/hbase-site.xml

    加入以下内容
    <!--HBase数据目录位置,master.hadoop是mater机器的域名(别名)-->
    <property>
    <name>hbase.rootdir</name>
    <value>hdfs://master:9000/hbase</value>
    </property>
    <!--启用分布式集群-->
    <property>
    <name>hbase.cluster.distributed</name>
    <value>true</value>
    </property>
    <!--默认HMaster HTTP访问端口-->
    <property>
    <name>hbase.master.info.port</name>
    <value>16010</value>
    </property>
    <!--默认HRegionServer HTTP访问端口-->
    <property>
    <name>hbase.regionserver.info.port</name>
    <value>16030</value>
    </property>
    <!--不使用默认内置的,配置独立的ZK集群地址,除了master,自己配了几台zookeeper,此处就配几台-->
    <property>
    <name>hbase.zookeeper.quorum</name>
    <value>master:2181,slave1:2181,slave2:2181</value>
    </property>

    #HBase Master 启动 check the config value of 'hbase.procedure.store.wal.use.hsync' 解决方法


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


    <property>
    <name>hbase.hregion.max.filesize</name>
    <value>10*1024*1024*1024</value>
    </property>


    *3 修改conf下的regionservers文件加入regoinserver的ip

    sudo vi /opt/hbase/conf/regionservers

    slave1
    slave2

    4 保证集群中所有的机器时间相同(30s以内)
    date
    sudo date -s "180722 20:14:00"

    5 在hdfs中创建 /hbase目录 只创建一次
    使用hdfs用户
    hdfs dfs -mkdir /hbase
    hdfs dfs -chown hbase:supergroup /hbase

    *6 master上的hbase用户到slave1 slave2的免密钥登陆

    7 启动
    i,做过免密钥 主节点 start-hbase.sh

    ii, hbase-daemon.sh start master
    hbase-daemon.sh start regionserver

    Ruby

  • 相关阅读:
    肩部肌肉劳损zt
    大屏幕手机上网页字体显示很小的问题
    SWT的Display
    The connection to adb is down, and a severe error has occured.
    [ZT]使用tmpfs缓存文件提高性能
    Mutex
    javascript阻塞加载问题【转】
    IE参考
    2台电脑网线对接注意的事项
    重建索引
  • 原文地址:https://www.cnblogs.com/Diyo/p/11453913.html
Copyright © 2020-2023  润新知