本文主要是介绍open-falcon hbase服务配置,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
目的
安装 hbase
需求
zookeeper
hadoop
参考
软件下载
hbase 官方下载地址
hbase 安装
环境变量
java (/etc/profile)
JAVA_HOME=/apps/svr/java
JRE_HOME=$JAVA_HOME/jre
CLASS_PATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib/rt.jar
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
export JAVA_HOME JRE_HOME CLASS_PATH PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL
hbase 环境 (/etc/profile)
HBASE_HOME=/apps/svr/hbase
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin:$ZOOKEEPER_HOME/bin:$HADOOP_HOME/bin:$HADOOP_HOME/sbin:$HBASE_HOME/bin
hbase 启动环境
grep -v "#" /apps/svr/hbase/conf/hbase-env.sh | grep -v ^$
export JAVA_HOME=/apps/svr/java
export HBASE_OPTS="$HBASE_OPTS -XX:+UseConcMarkSweepGC"
export HBASE_MANAGES_ZK=false
解压与目录
解压 hbase
tar xf hbase-2.2.5-bin.tar.gz -C /apps/svr/
cd /apps/svr/
ln -s hbase-2.2.5 hbase
创建 temp 目录
mkdir /apps/svr/hbase/tmp
确认 hadoop 环境
[root@ns-yun-020022 conf]# jps
155507 DataNode
155927 NodeManager
144379 QuorumPeerMain
6239 Jps
155741 JournalNode[root@ns-yun-020023 conf]# jps
176242 DataNode
176550 JournalNode
56663 Jps
175832 DFSZKFailoverController
176424 NameNode
177209 ResourceManager
166153 QuorumPeerMain
176829 NodeManager[root@ns-yun-020024 hbase]# jps
37233 Jps
8531 NodeManager
8036 JournalNode
7720 NameNode
6683 DFSZKFailoverController
9851 JobHistoryServer
3324 QuorumPeerMain
7388 DataNode
8399 ResourceManager
配置 hbase
每台 habase 都据需要下面配置
/apps/svr/hbase/conf/hbase-site.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration><property><name>hbase.cluster.distributed</name><value>true</value></property><property><name>hbase.rootdir</name><value>hdfs://ha01/vipfalcon</value></property><property><name>hbase.tmp.dir</name><value>/apps/svr/hbase/tmp</value></property><property><name>zookeeper.znode.parent</name><value>/vipfalcon</value></property><property><name>hbase.zookeeper.quorum</name><value>ns-yun-020022.133.com:2181,ns-yun-020023.133.com:2181,ns-yun-020024.133.com:2181</value></property><property><name>hbase.unsafe.stream.capability.enforce</name><value>false</value></property>
</configuration>
/apps/svr/hbase/conf/regionservers
ns-yun-020022.133.com
ns-yun-020023.133.com
ns-yun-020024.133.com
复制 hadoop 配置至 hbase
cp /apps/svr/hadoop/etc/hadoop/core-site.xml /apps/svr/hadoop/etc/hadoop/hdfs-site.xml /apps/svr/hbase/conf/
启动 hbase
只需要在其中一台 hbase上启动
[root@ns-yun-020022 apps]# start-hbase.sh
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/apps/svr/hadoop-2.10.0/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/apps/svr/hbase-2.2.5/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 /apps/svr/hbase/bin/../logs/hbase-root-master-ns-yun-020022.133.com.out
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/apps/svr/hadoop-2.10.0/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/apps/svr/hbase-2.2.5/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]
ns-yun-020022.133.com: running regionserver, logging to /apps/svr/hbase/bin/../logs/hbase-root-regionserver-ns-yun-020022.133.com.out
ns-yun-020023.133.com: running regionserver, logging to /apps/svr/hbase/bin/../logs/hbase-root-regionserver-ns-yun-020023.133.com.out
ns-yun-020024.133.com: running regionserver, logging to /apps/svr/hbase/bin/../logs/hbase-root-regionserver-ns-yun-020024.133.com.out[root@ns-yun-020022 apps]# start-hbase.sh
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/apps/svr/hadoop-2.10.0/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/apps/svr/hbase-2.2.5/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 /apps/svr/hbase/bin/../logs/hbase-root-master-ns-yun-020022.133.com.out
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/apps/svr/hadoop-2.10.0/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/apps/svr/hbase-2.2.5/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]
ns-yun-020022.133.com: running regionserver, logging to /apps/svr/hbase/bin/../logs/hbase-root-regionserver-ns-yun-020022.133.com.out
ns-yun-020023.133.com: running regionserver, logging to /apps/svr/hbase/bin/../logs/hbase-root-regionserver-ns-yun-020023.133.com.out
ns-yun-020024.133.com: running regionserver, logging to /apps/svr/hbase/bin/../logs/hbase-root-regionserver-ns-yun-020024.133.com.out
留意日志, 已启动 master 及 regionserver
验证 hbase 启动
[root@ns-yun-020022 apps]# jps
155507 DataNode
155927 NodeManager
6792 HRegionServer <- hbaseregionserver
144379 QuorumPeerMain
8091 Jps
6607 HMaster <- hbase master
155741 JournalNode[root@ns-yun-020023 conf]# jps
176242 DataNode
176550 JournalNode
56836 HRegionServer <- hbaseregionserver
57703 Jps
175832 DFSZKFailoverController
57210 HMaster
176424 NameNode
177209 ResourceManager
166153 QuorumPeerMain
176829 NodeManager[root@ns-yun-020024 hbase]# jps
8531 NodeManager
8036 JournalNode
38276 Jps
7720 NameNode
37914 HMaster
37498 HRegionServer <- hbaseregionserver
6683 DFSZKFailoverController
9851 JobHistoryServer
3324 QuorumPeerMain
7388 DataNode
8399 ResourceManager
手动启动
假如进程有问题,可以通过下面方法进行手动启动
hbase-daemon.sh start master
hbase-daemon.sh start regionserver
这篇关于open-falcon hbase服务配置的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!