HBase完全分布式集群搭建

              HBase完全分布式集群搭建

                                     作者:尹正杰

版权声明:原创作品,谢绝转载!否则将追究法律责任。

 

 

 

 

一.下载HBase软件

1>.访问HBase官网并点击下载

  官网地址:
    http://hbase.apache.org/

  博主推荐阅读:
    http://hbase.apache.org/book.html#arch.overview
    http://hbase.apache.org/book.html#faq

2>.选择您要下载的HBase版本(该版本要和开发人员协商,最好和开发人员使用的版本一致哟)

  下载地址:
    http://hbase.apache.org/downloads.html

3>.下载HBase

 

二.部署HBase集群

1>.搭建HDFS HA集群

  博主推荐阅读:
    https://www.cnblogs.com/yinzhengjie2020/p/12508145.html

2>.解压HBase软件并创建符号链接

[root@hadoop101.yinzhengjie.org.cn ~]# ll
total 230512
-rw-r--r-- 1 root root  12436328 May 12 05:50 apache-zookeeper-3.6.1-bin.tar.gz
-rw-r--r-- 1 root root 223600848 May 25 07:49 hbase-2.2.4-bin.tar.gz
[root@hadoop101.yinzhengjie.org.cn ~]# 
[root@hadoop101.yinzhengjie.org.cn ~]# tar -zxf hbase-2.2.4-bin.tar.gz -C /yinzhengjie/softwares/
[root@hadoop101.yinzhengjie.org.cn ~]# 
[root@hadoop101.yinzhengjie.org.cn ~]# ln -svT /yinzhengjie/softwares/hbase-2.2.4 /yinzhengjie/softwares/hbase
‘/yinzhengjie/softwares/hbase’ -> ‘/yinzhengjie/softwares/hbase-2.2.4’
[root@hadoop101.yinzhengjie.org.cn ~]# 
[root@hadoop101.yinzhengjie.org.cn ~]# ll /yinzhengjie/softwares | grep hbase
lrwxrwxrwx  1 root root  34 May 25 08:21 hbase -> /yinzhengjie/softwares/hbase-2.2.4
drwxr-xr-x  6 root root 170 May 25 08:16 hbase-2.2.4
[root@hadoop101.yinzhengjie.org.cn ~]# 

3>.配置HBase的环境变量

[root@hadoop101.yinzhengjie.org.cn ~]# vim /etc/profile.d/hbase.sh 
[root@hadoop101.yinzhengjie.org.cn ~]# 
[root@hadoop101.yinzhengjie.org.cn ~]# cat /etc/profile.d/hbase.sh 
#Add ${HBASE_HOME} by yinzhengjie
HBASE_HOME=/yinzhengjie/softwares/hbase
PATH=$PATH:${HBASE_HOME}/bin
[root@hadoop101.yinzhengjie.org.cn ~]# 
[root@hadoop101.yinzhengjie.org.cn ~]# source /etc/profile.d/hbase.sh 
[root@hadoop101.yinzhengjie.org.cn ~]# 
[root@hadoop101.yinzhengjie.org.cn ~]# hbase          #连续按两下“tab”键,如果出现下面的提示说明配置的环境变量已经成效啦~
hbase             hbase-cleanup.sh  hbase-common.sh   hbase-config.sh   hbase-daemon.sh   hbase-daemons.sh  hbase-jruby       
[root@hadoop101.yinzhengjie.org.cn ~]# hbase

4>.修改HBASE的环境变量

[root@hadoop101.yinzhengjie.org.cn ~]# echo $JAVA_HOME
/yinzhengjie/softwares/jdk1.8.0_201
[root@hadoop101.yinzhengjie.org.cn ~]# 
[root@hadoop101.yinzhengjie.org.cn ~]# which java
/yinzhengjie/softwares/jdk1.8.0_201/bin/java
[root@hadoop101.yinzhengjie.org.cn ~]# 
[root@hadoop101.yinzhengjie.org.cn ~]# cp /yinzhengjie/softwares/hbase/conf/hbase-env.sh /yinzhengjie/softwares/hbase/conf/hbase-env.sh-`date +%F`
[root@hadoop101.yinzhengjie.org.cn ~]# 
[root@hadoop101.yinzhengjie.org.cn ~]# grep JAVA_HOME /yinzhengjie/softwares/hbase/conf/hbase-env.sh 
# export JAVA_HOME=/usr/java/jdk1.8.0/
[root@hadoop101.yinzhengjie.org.cn ~]# 
[root@hadoop101.yinzhengjie.org.cn ~]# sed -r -i s'@# (export JAVA_HOME=)/usr/java/jdk1.8.0/@\1/yinzhengjie/softwares/jdk1.8.0_201@' /yinzhengjie/softwares/hbase/conf/hbase-env.sh     #自定义JDK环境
[root@hadoop101.yinzhengjie.org.cn ~]# 
[root@hadoop101.yinzhengjie.org.cn ~]# grep JAVA_HOME /yinzhengjie/softwares/hbase/conf/hbase-env.sh 
export JAVA_HOME=/yinzhengjie/softwares/jdk1.8.0_201
[root@hadoop101.yinzhengjie.org.cn ~]# 
[root@hadoop101.yinzhengjie.org.cn ~]# grep HBASE_MANAGES_ZK /yinzhengjie/softwares/hbase/conf/hbase-env.sh 
# export HBASE_MANAGES_ZK=true
[root@hadoop101.yinzhengjie.org.cn ~]# 
[root@hadoop101.yinzhengjie.org.cn ~]# sed -r -i s'@# (export HBASE_MANAGES_ZK=)true@\1false@' /yinzhengjie/softwares/hbase/conf/hbase-env.sh       #不使用HBase内置的zookeeper,即使用咱们自己搭建的zookeeper集群。
[root@hadoop101.yinzhengjie.org.cn ~]# 
[root@hadoop101.yinzhengjie.org.cn ~]# grep HBASE_MANAGES_ZK /yinzhengjie/softwares/hbase/conf/hbase-env.sh 
export HBASE_MANAGES_ZK=false
[root@hadoop101.yinzhengjie.org.cn ~]# 

5>.配置hbase-site.xml

[root@hadoop101.yinzhengjie.org.cn ~]# vim /yinzhengjie/softwares/hbase/conf/hbase-site.xml 
[root@hadoop101.yinzhengjie.org.cn ~]# 
[root@hadoop101.yinzhengjie.org.cn ~]# cat /yinzhengjie/softwares/hbase/conf/hbase-site.xml 
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
/**
 *
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
-->
<configuration>

       <!-- ********** HBase核心配置(必须配置部分) ********** -->
    <property>
        <name>hbase.rootdir</name>
        <value>hdfs://yinzhengjie-hdfs-ha/hbase</value>
        <description>指定Region服务器共享的目录,用来持久存储HBase的数据,URL必须完全正确,其中包含了文件系统的schema。默认值"${hbase.tmp.dir}/hbase"</description>
    </property>

    <property>
        <name>hbase.tmp.dir</name>
        <value>/yinzhengjie/data/hbase</value>
        <description>指定Hbase本地文件系统的临时文件存放路径,默认值为"${java.io.tmpdir}/hbase-${user.name}".</description>
    </property>

    <property>
        <name>hbase.cluster.distributed</name>
        <value>true</value>
                <description>指定HBase集群的运行模式,该值为false时,集群为单机模式;该值为true时,集群是分布式模式。如果将该值设置为false,则HBase与Zookeeper的守护进程将运行在一个JVM中。默认值为false</description>
    </property>

    <property>   
        <name>hbase.zookeeper.quorum</name>
        <value>hadoop101.yinzhengjie.org.cn:2181,hadoop102.yinzhengjie.org.cn:2181,hadoop103.yinzhengjie.org.cn:2181</value>
                <description>配置zookeeper集群地址,不要指定znode路径,HBase会默认将元数据放在根znode</description>
    </property>

    <property>
        <name>hbase.unsafe.stream.capability.enforce</name>
        <value>false</value>
                <description>程序WAL依赖于在组件故障期间hsync进行正确操作的能力,但底层文件系统不支持这样做时需要禁用hsync,默认值为"false"</description>
    </property>


       <!-- ********** HMaster相关配置 ********** -->
    <property>   
        <name>hbase.master.info.bindAddress</name>
        <value>hadoop101.yinzhengjie.org.cn</value>
                <description>HBase Master 的 Web UI绑定的地址,默认值为"0.0.0.0"</description>
    </property>

    <property>
        <name>hbase.master.port</name>
        <value>16000</value>
                <description>HBase Master绑定端口</description>
    </property>

        <property>
                <name>hbase.master.info.port</name>
                <value>16010</value>
                <description>HBase Master的Web UI端口,默认值为:"16010",如果不想启动UI实例,则可以将当前参数设置为-1</description>
        </property>


       <!-- ********** HRegionServer相关配置 ********** -->
        <property>
                <name>hbase.regionserver.port</name>
                <value>16020</value>
                <description>HBase RegionServer绑定的端口,默认值为:"16020".</description>
        </property>


        <property>
                <name>hbase.regionserver.info.port</name>
                <value>16030</value>
                <description>HBase RegionServer的Web UI端口,默认值为:"16030"设置为-1可以禁用HBase RegionServer的Web UI。</description>
        </property>

        <property>
                <name>hbase.regionserver.info.bindAddress</name>
                <value>0.0.0.0</value>
                <description>HBase RegionServer的Web UI地址,默认值为"0.0.0.0"</description>
        </property>

</configuration>
[root@hadoop101.yinzhengjie.org.cn ~]# 

6>.配置regionservers文件(即指定HRegionserver节点)

[root@hadoop101.yinzhengjie.org.cn ~]# vim /yinzhengjie/softwares/hbase/conf/regionservers 
[root@hadoop101.yinzhengjie.org.cn ~]# 
[root@hadoop101.yinzhengjie.org.cn ~]# cat /yinzhengjie/softwares/hbase/conf/regionservers 
hadoop101.yinzhengjie.org.cn
hadoop102.yinzhengjie.org.cn
hadoop103.yinzhengjie.org.cn
hadoop104.yinzhengjie.org.cn
hadoop105.yinzhengjie.org.cn
hadoop106.yinzhengjie.org.cn
[root@hadoop101.yinzhengjie.org.cn ~]# 

7>.配置Hadoop配置文件的符号链接

[root@hadoop101.yinzhengjie.org.cn ~]# ln -svT /yinzhengjie/softwares/ha/etc/hadoop/core-site.xml /yinzhengjie/softwares/hbase/conf/core-site.xml
‘/yinzhengjie/softwares/hbase/conf/core-site.xml’ -> ‘/yinzhengjie/softwares/ha/etc/hadoop/core-site.xml’
[root@hadoop101.yinzhengjie.org.cn ~]# 
[root@hadoop101.yinzhengjie.org.cn ~]# ln -svT /yinzhengjie/softwares/ha/etc/hadoop/hdfs-site.xml /yinzhengjie/softwares/hbase/conf/hdfs-site.xml
‘/yinzhengjie/softwares/hbase/conf/hdfs-site.xml’ -> ‘/yinzhengjie/softwares/ha/etc/hadoop/hdfs-site.xml’
[root@hadoop101.yinzhengjie.org.cn ~]# 

8>.分发Hbase的数据目录

[root@hadoop101.yinzhengjie.org.cn ~]# rsync-hadoop.sh /yinzhengjie/softwares/hbase
******* [hadoop102.yinzhengjie.org.cn] node starts synchronizing [/yinzhengjie/softwares/hbase] *******
命令执行成功
******* [hadoop103.yinzhengjie.org.cn] node starts synchronizing [/yinzhengjie/softwares/hbase] *******
命令执行成功
******* [hadoop104.yinzhengjie.org.cn] node starts synchronizing [/yinzhengjie/softwares/hbase] *******
命令执行成功
******* [hadoop105.yinzhengjie.org.cn] node starts synchronizing [/yinzhengjie/softwares/hbase] *******
命令执行成功
******* [hadoop106.yinzhengjie.org.cn] node starts synchronizing [/yinzhengjie/softwares/hbase] *******
命令执行成功
[root@hadoop101.yinzhengjie.org.cn ~]# 
[root@hadoop101.yinzhengjie.org.cn ~]# rsync-hadoop.sh /yinzhengjie/softwares/hbase
[root@hadoop101.yinzhengjie.org.cn ~]# rsync-hadoop.sh /yinzhengjie/softwares/hbase-2.2.4
******* [hadoop102.yinzhengjie.org.cn] node starts synchronizing [/yinzhengjie/softwares/hbase-2.2.4] *******
命令执行成功
******* [hadoop103.yinzhengjie.org.cn] node starts synchronizing [/yinzhengjie/softwares/hbase-2.2.4] *******
命令执行成功
******* [hadoop104.yinzhengjie.org.cn] node starts synchronizing [/yinzhengjie/softwares/hbase-2.2.4] *******
命令执行成功
******* [hadoop105.yinzhengjie.org.cn] node starts synchronizing [/yinzhengjie/softwares/hbase-2.2.4] *******
命令执行成功
******* [hadoop106.yinzhengjie.org.cn] node starts synchronizing [/yinzhengjie/softwares/hbase-2.2.4] *******
命令执行成功
[root@hadoop101.yinzhengjie.org.cn ~]# 
[root@hadoop101.yinzhengjie.org.cn ~]# rsync-hadoop.sh /yinzhengjie/softwares/hbase-2.2.4
[root@hadoop101.yinzhengjie.org.cn ~]# rsync-hadoop.sh /etc/profile.d/hbase.sh 
******* [hadoop102.yinzhengjie.org.cn] node starts synchronizing [/etc/profile.d/hbase.sh] *******
命令执行成功
******* [hadoop103.yinzhengjie.org.cn] node starts synchronizing [/etc/profile.d/hbase.sh] *******
命令执行成功
******* [hadoop104.yinzhengjie.org.cn] node starts synchronizing [/etc/profile.d/hbase.sh] *******
命令执行成功
******* [hadoop105.yinzhengjie.org.cn] node starts synchronizing [/etc/profile.d/hbase.sh] *******
命令执行成功
******* [hadoop106.yinzhengjie.org.cn] node starts synchronizing [/etc/profile.d/hbase.sh] *******
命令执行成功
[root@hadoop101.yinzhengjie.org.cn ~]# 
[root@hadoop101.yinzhengjie.org.cn ~]# rsync-hadoop.sh /etc/profile.d/hbase.sh

9>.启动完全分布式HBase集群并访问HBase Master的WebUI界面

[root@hadoop101.yinzhengjie.org.cn ~]# start-hbase.sh 
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/yinzhengjie/softwares/ha/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/yinzhengjie/softwares/hbase-2.2.4/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
running master, logging to /yinzhengjie/softwares/hbase/bin/../logs/hbase-root-master-hadoop101.yinzhengjie.org.cn.out
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/yinzhengjie/softwares/ha/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/yinzhengjie/softwares/hbase-2.2.4/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
hadoop103.yinzhengjie.org.cn: running regionserver, logging to /yinzhengjie/softwares/hbase/bin/../logs/hbase-root-regionserver-hadoop103.yinzhengjie.org.cn.out
hadoop105.yinzhengjie.org.cn: regionserver running as process 5317. Stop it first.
hadoop102.yinzhengjie.org.cn: running regionserver, logging to /yinzhengjie/softwares/hbase/bin/../logs/hbase-root-regionserver-hadoop102.yinzhengjie.org.cn.out
hadoop106.yinzhengjie.org.cn: running regionserver, logging to /yinzhengjie/softwares/hbase/bin/../logs/hbase-root-regionserver-hadoop106.yinzhengjie.org.cn.out
hadoop104.yinzhengjie.org.cn: running regionserver, logging to /yinzhengjie/softwares/hbase/bin/../logs/hbase-root-regionserver-hadoop104.yinzhengjie.org.cn.out
hadoop101.yinzhengjie.org.cn: running regionserver, logging to /yinzhengjie/softwares/hbase/bin/../logs/hbase-root-regionserver-hadoop101.yinzhengjie.org.cn.out
hadoop102.yinzhengjie.org.cn: SLF4J: Class path contains multiple SLF4J bindings.
hadoop102.yinzhengjie.org.cn: SLF4J: Found binding in [jar:file:/yinzhengjie/softwares/ha/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
hadoop102.yinzhengjie.org.cn: SLF4J: Found binding in [jar:file:/yinzhengjie/softwares/hbase-2.2.4/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
hadoop102.yinzhengjie.org.cn: SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
hadoop106.yinzhengjie.org.cn: SLF4J: Class path contains multiple SLF4J bindings.
hadoop106.yinzhengjie.org.cn: SLF4J: Found binding in [jar:file:/yinzhengjie/softwares/ha/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
hadoop106.yinzhengjie.org.cn: SLF4J: Found binding in [jar:file:/yinzhengjie/softwares/hbase-2.2.4/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
hadoop106.yinzhengjie.org.cn: SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
hadoop104.yinzhengjie.org.cn: SLF4J: Class path contains multiple SLF4J bindings.
hadoop104.yinzhengjie.org.cn: SLF4J: Found binding in [jar:file:/yinzhengjie/softwares/ha/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
hadoop104.yinzhengjie.org.cn: SLF4J: Found binding in [jar:file:/yinzhengjie/softwares/hbase-2.2.4/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
hadoop104.yinzhengjie.org.cn: SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
[root@hadoop101.yinzhengjie.org.cn ~]# 
[root@hadoop101.yinzhengjie.org.cn ~]# start-hbase.sh

10>.访问HBase RegionServer的WebUI界面

11>.管理HBase集群脚本

[root@hadoop101.yinzhengjie.org.cn ~]# start-hbase.sh 
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/yinzhengjie/softwares/ha/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/yinzhengjie/softwares/hbase-2.2.4/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
running master, logging to /yinzhengjie/softwares/hbase/bin/../logs/hbase-root-master-hadoop101.yinzhengjie.org.cn.out
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/yinzhengjie/softwares/ha/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/yinzhengjie/softwares/hbase-2.2.4/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
hadoop103.yinzhengjie.org.cn: running regionserver, logging to /yinzhengjie/softwares/hbase/bin/../logs/hbase-root-regionserver-hadoop103.yinzhengjie.org.cn.out
hadoop105.yinzhengjie.org.cn: regionserver running as process 5317. Stop it first.
hadoop102.yinzhengjie.org.cn: running regionserver, logging to /yinzhengjie/softwares/hbase/bin/../logs/hbase-root-regionserver-hadoop102.yinzhengjie.org.cn.out
hadoop106.yinzhengjie.org.cn: running regionserver, logging to /yinzhengjie/softwares/hbase/bin/../logs/hbase-root-regionserver-hadoop106.yinzhengjie.org.cn.out
hadoop104.yinzhengjie.org.cn: running regionserver, logging to /yinzhengjie/softwares/hbase/bin/../logs/hbase-root-regionserver-hadoop104.yinzhengjie.org.cn.out
hadoop101.yinzhengjie.org.cn: running regionserver, logging to /yinzhengjie/softwares/hbase/bin/../logs/hbase-root-regionserver-hadoop101.yinzhengjie.org.cn.out
hadoop102.yinzhengjie.org.cn: SLF4J: Class path contains multiple SLF4J bindings.
hadoop102.yinzhengjie.org.cn: SLF4J: Found binding in [jar:file:/yinzhengjie/softwares/ha/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
hadoop102.yinzhengjie.org.cn: SLF4J: Found binding in [jar:file:/yinzhengjie/softwares/hbase-2.2.4/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
hadoop102.yinzhengjie.org.cn: SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
hadoop106.yinzhengjie.org.cn: SLF4J: Class path contains multiple SLF4J bindings.
hadoop106.yinzhengjie.org.cn: SLF4J: Found binding in [jar:file:/yinzhengjie/softwares/ha/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
hadoop106.yinzhengjie.org.cn: SLF4J: Found binding in [jar:file:/yinzhengjie/softwares/hbase-2.2.4/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
hadoop106.yinzhengjie.org.cn: SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
hadoop104.yinzhengjie.org.cn: SLF4J: Class path contains multiple SLF4J bindings.
hadoop104.yinzhengjie.org.cn: SLF4J: Found binding in [jar:file:/yinzhengjie/softwares/ha/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
hadoop104.yinzhengjie.org.cn: SLF4J: Found binding in [jar:file:/yinzhengjie/softwares/hbase-2.2.4/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
hadoop104.yinzhengjie.org.cn: SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
[root@hadoop101.yinzhengjie.org.cn ~]# 
[root@hadoop101.yinzhengjie.org.cn ~]# start-hbase.sh            #启动HBase集群
[root@hadoop101.yinzhengjie.org.cn ~]# stop-hbase.sh 
stopping hbase.............
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/yinzhengjie/softwares/ha/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/yinzhengjie/softwares/hbase-2.2.4/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
[root@hadoop101.yinzhengjie.org.cn ~]# 
[root@hadoop101.yinzhengjie.org.cn ~]# stop-hbase.sh            #停止HBase集群
  单独启动/停止/重启"HBase Master"角色:
    hbase-daemon.sh start master
    hbase-daemon.sh stop master
    hbase-daemon.sh restart master
  单独启动/停止/重启"HBase Region Server"角色:     hbase
-daemon.sh start regionserver     hbase-daemon.sh stop regionserver     hbase-daemon.sh restart regionserver   温馨提示:     身为运维人员,只要你搭建的服务是以集群的方式工作,那第一件事情就是应该让所有节点的时间保持一致。     如果服务不依赖时间同步,如果你没有配置集群时间同步那倒无所谓,比如Hadoop服务如果各节点相差10分钟还是可以运行的,但是这对开发以后排错会产生困扰,因此我强烈建议大家配置集群时间同步。     不仅如此,因为在使用集群搭建后期的HBase,Kudu等服务,若时间不同会直接导致你集群无法启动哟~     如果集群之间的节点时间不同步,会导致regionserver无法启动,抛出ClockOutOfSyncException异常。虽然可以通过hbase.master.maxclockskew参数来修改更大的值,但并不能根本解决问题,因此推荐大家在搭建集群之前最好配置chrony集群。     博主推荐阅读:       https://www.cnblogs.com/yinzhengjie/p/12292549.html

 

三.HBase shell常用命令总结

  博主推荐阅读:
    https://www.cnblogs.com/yinzhengjie2020/p/12239339.html

 

posted @ 2020-01-28 21:41  JasonYin2020  阅读(630)  评论(0编辑  收藏  举报