HBase的多節點集群詳細啟動步驟(3或5節點)分為:
1、HBASE_MANAGES_ZK的默認值是false(zookeeper外裝)(推薦)
2、HBASE_MANAGES_ZK的默認值是true(zookeeper自帶)
1、HBASE_MANAGES_ZK的默認值是false(推薦)
偽分布模式下,如(weekend110)
hbase-env.sh配置文檔中的HBASE_MANAGES_ZK的默認值是true,它表示HBase使用自身自帶的Zookeeper實例。但是,該實例只能為單機或偽分布模式下的HBase提供服務。
若是分布式模式,則需要配置自己的Zookeeper集群。如(HadoopMaster、HadoopSlave1、HadoopSlave2)
hbase-env.sh配置文檔中的HBASE_MANAGES_ZK的默認值是true,它表示,分布式模式里,在啟動HBase時,HBase將Zookeeper作為自身的一部分運行。進程變為HQuorumPeer。
hbase-env.sh配置文檔中的HBASE_MANAGES_ZK的默認值是false,它表示,分布式模式里,需要,先提前手動,每個節點都手動啟動Zookeeper,然后再在主節點上啟動HBase時,進程變為HMaster(HadoopMaster節點)。
若,HBASE_MANAGES_ZK的默認值是false
1、則,直接在HadoopMaster機器上,先啟動Hadoop,
2、在HadoopMaster、HadoopSlave1、HadoopSlave2機器上,分別手動一個一個得去,啟動Zookeeper
3、在HadoopMaster機器上,再啟動HBase即可。
1、則,直接在HadoopMaster機器上,先啟動Hadoop,
[hadoop@HadoopMaster hadoop-2.6.0]$ jps
1998 Jps
[hadoop@HadoopMaster hadoop-2.6.0]$ sbin/start-all.sh
This script is Deprecated. Instead use start-dfs.sh and start-yarn.sh
16/11/02 19:59:22 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Starting namenodes on [HadoopMaster]
HadoopMaster: starting namenode, logging to /home/hadoop/app/hadoop-2.6.0/logs/hadoop-hadoop-namenode-HadoopMaster.out
HadoopSlave1: starting datanode, logging to /home/hadoop/app/hadoop-2.6.0/logs/hadoop-hadoop-datanode-HadoopSlave1.out
HadoopSlave2: starting datanode, logging to /home/hadoop/app/hadoop-2.6.0/logs/hadoop-hadoop-datanode-HadoopSlave2.out
Starting secondary namenodes [0.0.0.0]
0.0.0.0: starting secondarynamenode, logging to /home/hadoop/app/hadoop-2.6.0/logs/hadoop-hadoop-secondarynamenode-HadoopMaster.out
16/11/02 20:00:00 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
starting yarn daemons
starting resourcemanager, logging to /home/hadoop/app/hadoop-2.6.0/logs/yarn-hadoop-resourcemanager-HadoopMaster.out
HadoopSlave2: starting nodemanager, logging to /home/hadoop/app/hadoop-2.6.0/logs/yarn-hadoop-nodemanager-HadoopSlave2.out
HadoopSlave1: starting nodemanager, logging to /home/hadoop/app/hadoop-2.6.0/logs/yarn-hadoop-nodemanager-HadoopSlave1.out
[hadoop@HadoopMaster hadoop-2.6.0]$ jps
2281 SecondaryNameNode
2124 NameNode
2430 ResourceManager
2736 Jps
[hadoop@HadoopSlave1 hadoop-2.6.0]$ jps
1877 Jps
[hadoop@HadoopSlave1 hadoop-2.6.0]$ jps
2003 NodeManager
2199 Jps
1928 DataNode
[hadoop@HadoopSlave1 hadoop-2.6.0]$
[hadoop@HadoopSlave2 hadoop-2.6.0]$ jps
1893 Jps
[hadoop@HadoopSlave2 hadoop-2.6.0]$ jps
2019 NodeManager
2195 Jps
1945 DataNode
[hadoop@HadoopSlave2 hadoop-2.6.0]$
2、在HadoopMaster、HadoopSlave1、HadoopSlave2機器上,分別手動一個一個得去,啟動Zookeeper
[hadoop@HadoopMaster hadoop-2.6.0]$cd ..
[hadoop@HadoopMaster app]$ cd zookeeper-3.4.6/
[hadoop@HadoopMaster zookeeper-3.4.6]$ bin/zkServer.sh start
[hadoop@HadoopSlave1 zookeeper-3.4.6]$ bin/zkServer.sh start
[hadoop@HadoopSlave2 zookeeper-3.4.6]$ bin/zkServer.sh start
3、在HadoopMaster機器上,再啟動HBase即可。
[hadoop@HadoopMaster hadoop-2.6.0]$ cd ..
[hadoop@HadoopMaster app]$ cd hbase-1.2.3
[hadoop@HadoopMaster hbase-1.2.3]$ bin/start-hbase.sh
HadoopSlave2: starting zookeeper, logging to /home/hadoop/app/hbase-1.2.3/bin/../logs/hbase-hadoop-zookeeper-HadoopSlave2.out
HadoopSlave1: starting zookeeper, logging to /home/hadoop/app/hbase-1.2.3/bin/../logs/hbase-hadoop-zookeeper-HadoopSlave1.out
HadoopMaster: starting zookeeper, logging to /home/hadoop/app/hbase-1.2.3/bin/../logs/hbase-hadoop-zookeeper-HadoopMaster.out
starting master, logging to /home/hadoop/app/hbase-1.2.3/logs/hbase-hadoop-master-HadoopMaster.out
HadoopSlave1: starting regionserver, logging to /home/hadoop/app/hbase-1.2.3/bin/../logs/hbase-hadoop-regionserver-HadoopSlave1.out
HadoopSlave2: starting regionserver, logging to /home/hadoop/app/hbase-1.2.3/bin/../logs/hbase-hadoop-regionserver-HadoopSlave2.out
[hadoop@HadoopMaster hbase-1.2.3]$ jps
進入hbase shell啊,只有HadoopMaster才可進,
[hadoop@HadoopMaster hbase-1.2.3]$ hbase shell
2016-11-02 20:07:31,288 WARN [main] util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/hadoop/app/hbase-1.2.3/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/hadoop/app/hadoop-2.6.0/share/hadoop/common/lib/slf4j-log4j12-1.7.5.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]
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 1.2.3, rbd63744624a26dc3350137b564fe746df7a721a4, Mon Aug 29 15:13:42 PDT 2016
hbase(main):001:0>
[hadoop@HadoopSlave1 hadoop-2.6.0]$ hbase shell
-bash: hbase: command not found
[hadoop@HadoopSlave1 hadoop-2.6.0]$
[hadoop@HadoopSlave2 hadoop-2.6.0]$ hbase shell
-bash: hbase: command not found
[hadoop@HadoopSlave2 hadoop-2.6.0]$
退出hbase shell啊
hbase(main):001:0> exit
[hadoop@HadoopMaster hbase-1.2.3]$
2、HBASE_MANAGES_ZK的默認值是true
偽分布模式下,如(weekend110、djt002)
hbase-env.sh配置文檔中的HBASE_MANAGES_ZK的默認值是true,它表示HBase使用自身自帶的Zookeeper實例。
但是,該實例只能為單機或偽分布模式下的HBase提供服務。
若是分布式模式,則需要配置自己的Zookeeper集群。如(HadoopMaster、HadoopSlave1、HadoopSlave2)
hbase-env.sh配置文檔中的HBASE_MANAGES_ZK的默認值是true,它表示,分布式模式里,在啟動HBase時,HBase將Zookeeper作為自身的一部分運行。進程變為HQuorumPeer。
hbase-env.sh配置文檔中的HBASE_MANAGES_ZK的默認值是false,它表示,分布式模式里,需要,先提前手動,每個節點都手動啟動Zookeeper,然后再在主節點上啟動HBase時,進程變為HMaster(HadoopMaster節點)。
若,HBASE_MANAGES_ZK的默認值是true
1、則,直接在HadoopMaster機器上,先啟動Hadoop,
2、再啟動HBase即可。
1、則,直接在HadoopMaster機器上,先啟動Hadoop,
[hadoop@HadoopMaster hadoop-2.6.0]$ jps
1998 Jps
[hadoop@HadoopMaster hadoop-2.6.0]$ sbin/start-all.sh
This script is Deprecated. Instead use start-dfs.sh and start-yarn.sh
16/11/02 19:59:22 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Starting namenodes on [HadoopMaster]
HadoopMaster: starting namenode, logging to /home/hadoop/app/hadoop-2.6.0/logs/hadoop-hadoop-namenode-HadoopMaster.out
HadoopSlave1: starting datanode, logging to /home/hadoop/app/hadoop-2.6.0/logs/hadoop-hadoop-datanode-HadoopSlave1.out
HadoopSlave2: starting datanode, logging to /home/hadoop/app/hadoop-2.6.0/logs/hadoop-hadoop-datanode-HadoopSlave2.out
Starting secondary namenodes [0.0.0.0]
0.0.0.0: starting secondarynamenode, logging to /home/hadoop/app/hadoop-2.6.0/logs/hadoop-hadoop-secondarynamenode-HadoopMaster.out
16/11/02 20:00:00 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
starting yarn daemons
starting resourcemanager, logging to /home/hadoop/app/hadoop-2.6.0/logs/yarn-hadoop-resourcemanager-HadoopMaster.out
HadoopSlave2: starting nodemanager, logging to /home/hadoop/app/hadoop-2.6.0/logs/yarn-hadoop-nodemanager-HadoopSlave2.out
HadoopSlave1: starting nodemanager, logging to /home/hadoop/app/hadoop-2.6.0/logs/yarn-hadoop-nodemanager-HadoopSlave1.out
[hadoop@HadoopMaster hadoop-2.6.0]$ jps
2281 SecondaryNameNode
2124 NameNode
2430 ResourceManager
2736 Jps
[hadoop@HadoopSlave1 hadoop-2.6.0]$ jps
1877 Jps
[hadoop@HadoopSlave1 hadoop-2.6.0]$ jps
2003 NodeManager
2199 Jps
1928 DataNode
[hadoop@HadoopSlave1 hadoop-2.6.0]$
[hadoop@HadoopSlave2 hadoop-2.6.0]$ jps
1893 Jps
[hadoop@HadoopSlave2 hadoop-2.6.0]$ jps
2019 NodeManager
2195 Jps
1945 DataNode
[hadoop@HadoopSlave2 hadoop-2.6.0]$
2、再啟動HBase即可。
[hadoop@HadoopMaster hadoop-2.6.0]$ cd ..
[hadoop@HadoopMaster app]$ cd hbase-1.2.3
[hadoop@HadoopMaster hbase-1.2.3]$ bin/start-hbase.sh
HadoopSlave2: starting zookeeper, logging to /home/hadoop/app/hbase-1.2.3/bin/../logs/hbase-hadoop-zookeeper-HadoopSlave2.out
HadoopSlave1: starting zookeeper, logging to /home/hadoop/app/hbase-1.2.3/bin/../logs/hbase-hadoop-zookeeper-HadoopSlave1.out
HadoopMaster: starting zookeeper, logging to /home/hadoop/app/hbase-1.2.3/bin/../logs/hbase-hadoop-zookeeper-HadoopMaster.out
starting master, logging to /home/hadoop/app/hbase-1.2.3/logs/hbase-hadoop-master-HadoopMaster.out
HadoopSlave1: starting regionserver, logging to /home/hadoop/app/hbase-1.2.3/bin/../logs/hbase-hadoop-regionserver-HadoopSlave1.out
HadoopSlave2: starting regionserver, logging to /home/hadoop/app/hbase-1.2.3/bin/../logs/hbase-hadoop-regionserver-HadoopSlave2.out
[hadoop@HadoopMaster hbase-1.2.3]$ jps
3201 Jps
2281 SecondaryNameNode
2951 HQuorumPeer
2124 NameNode
2430 ResourceManager
3013 HMaster
[hadoop@HadoopMaster hbase-1.2.3]$
[hadoop@HadoopSlave1 hadoop-2.6.0]$ jps
2336 HRegionServer
2003 NodeManager
2396 Jps
2257 HQuorumPeer
1928 DataNode
[hadoop@HadoopSlave1 hadoop-2.6.0]$
[hadoop@HadoopSlave2 hadoop-2.6.0]$ jps
2019 NodeManager
2254 HQuorumPeer
2451 Jps
2333 HRegionServer
1945 DataNode
[hadoop@HadoopSlave2 hadoop-2.6.0]$
進入hbase shell啊,只有HadoopMaster才可進,
[hadoop@HadoopMaster hbase-1.2.3]$ hbase shell
2016-11-02 20:07:31,288 WARN [main] util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/hadoop/app/hbase-1.2.3/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/hadoop/app/hadoop-2.6.0/share/hadoop/common/lib/slf4j-log4j12-1.7.5.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]
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 1.2.3, rbd63744624a26dc3350137b564fe746df7a721a4, Mon Aug 29 15:13:42 PDT 2016
hbase(main):001:0>
[hadoop@HadoopSlave1 hadoop-2.6.0]$ hbase shell
-bash: hbase: command not found
[hadoop@HadoopSlave1 hadoop-2.6.0]$
[hadoop@HadoopSlave2 hadoop-2.6.0]$ hbase shell
-bash: hbase: command not found
[hadoop@HadoopSlave2 hadoop-2.6.0]$
退出hbase shell啊
hbase(main):001:0> exit
[hadoop@HadoopMaster hbase-1.2.3]$
