HBase-HA installation

HBase-HA installation

-1. Target:

10.156.50.35Hmaster10.156.50.36HMaster10.156.50.37hRegionServer

0. Prepare the Hadoop server

10.156.50.35 yanfabu2-35.base.app.dev.yf zk1hadoop1 master1 master10.156.50.36 yanfabu2-36.base.app.dev.yf zk2hadoop2 master210.156.50.37 yanfabu2-37.base.app.dev.yf zk3hadoop3 Slaver1

Preparation NTP server

Yum Install NTP -YCHKCONFIG NTPD ONVI /ETC/NTP.CONF server configuration: # Settings Allow access to NTP-Server to make school-time network segment restrict 172.23.27.120 mask 255.255.255.0 Nomodify NOTLO # Local Clock Source Server 172.23.27.120 # When the outside Clock is unavailable, use local clock fudge 172.23.27.120 Stratum 10 client configuration: # Set up the upper clock source, set to NTP Server Address Server 172.23.27.120 # Allowed with the upper clock server synchronization time Restrict 172.23.27.120 Nomodify NOTRAP NOQUERY # Local clock Server172.23.27.115 # When the upper clock source is unavailable, use the local clock fudge 172.23.27.115 Stratum 10 Run server-side service NTPD StartService NTPD Stopntpstat client ntpdate -u 172.23.27.120service NTPD StartNTPSTAT View Watch NTPQ -P

2. Install HBase

2.0 Modified ~ / .bash_profile

Vim ~ / .bash_profileexport hbase_home = / home / zkkafka / hbaseexport path = HBASE_HOME / BIN: $ PATHSOURCE ~ / .BASH_PROFILE

2.1 Modify HBase-evn.sh

# Open Java_Home Configure Export Java_Home = / Home / ZKKAFKA / JDK1.8.0_151 / # Close HBase comes with ZooKeeper, use ZooKeeper Cluster Export HBase_Manages_zk = False

2.2 Modify HBase-Site.xml

HBase.Rootdir name> hdfs: // master / hbase value> property> hbase.cluster.distribute name> True value> property> hbase.zookeeper.quorum name> master1, master2, slavert1 proty> configuration>

2.3 Modify the RegionServers configuration

Slaver1

2.4 Modify Backup-MasterS

Master2

2.5 Copy Hadoop Profile HDFS-Site.xml to HBase’s conf directory

cp /home/zkkafka/hadoop/etc/hadoop/hdfs-site.xml ./

2.6 Copy configuration files to other nodes

scp /home/zkkafka/hbase/conf/*[email protected]:/home/zkkafka/hbase/conf/scp /home/zkkafka/hbase/conf/*[email protected]:/home/zkkafka/hbase/ conf /

2.7 start hbase

sh /home/zkkafka/hbase/bin/start-hbase.sh[[email protected] bin] $ ./start-hbase.sh SLF4J: Class path contains multiple SLF4J bindings.SLF4J: Found binding in [jar: file: /home/zkkafka/hbase/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]SLF4J: Found binding in [jar: file: / home / zkkafka / hadoop / 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] running master, logging to /home/zkkafka/hbase/bin/../logs/hbase-zkkafka-master-yanfabu2-35.base.app.dev.yf .outslaver1: running regionserver, logging to /home/zkkafka/hbase/bin/../logs/hbase-zkkafka-regionserver-yanfabu2-37.base.app.dev.yf.outmaster2: running master, logging to / home / zkkafka / hbase / bin /../ logs / hbase-zkkafka-master-yanfabu2-36.base.app.dev.yf.out

2.8 View process hbase

[Zkkafka @ yanfabu2-35 bin] $ jps59330 QuorumPeerMain79763 Jps56377 Kafka86680 ResourceManager86570 DFSZKFailoverController79514 HMaster ¡Ì86044 JournalNode87356 NameNode

[Zkkafka @ yanfabu2-36 ~] $ jps37365 QuorumPeerMain99335 Jps56489 DFSZKFailoverController99224 HMaster ¡Ì34571 Kafka56606 NameNode56319 JournalNode

[Zkkafka @ yanfabu2-37 ~] $ jps61619 JournalNode61829 NodeManager42955 QuorumPeerMain73002 HRegionServer ¡Ì40189 Kafka61693 DataNode73182 Jps

2.9 View web-ui

http://10.156.50.35:16010/master-statushttp://10.156.50.36:16010/master-status

3. shell command

CD / home / zkkafka / hadoop / share / hadoop / yarn / lib / mv jline-0.9.94.jar jline-0.9.94.jar.bakrz jline-2.12.jar [zkkafka @ yanfabu2-35 ~] $ HBASE VERSISLF4J: Class Path Contains Multiple SLF4J Bindings Multiple SLF4J: Found Binding in [jar: file: /Home/zkkafka/hbase/lib/slf4j-log4j12-1.7.25.jar! /Org/slf4j/impl/staticLoggerBinder.class] SLF4J: Found Binding in [jar: file: /Home/zkkafka/hadoop/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 2.0.5Source code repository git: // dd7c519a402b / opt / hbase-rm / output / hbase revision = 76458dd074df17520ad451ded198cd832138E929compiled by HBase-rm on mon mar 18 00:41:49 UTC 2019FROM Source with checksum fd9cba949d65fd3bca4df155254ac28c

[zkkafka @ yanfabu2-35 lib] $ HBASE shellslf4j: Class Path Contains Multiple SLF4J Bindings.SLF4J: Found Binding in [jar: file: /Home/zkkafka/hbase/lib/slf4j-log4j12-1.7.25.jar! / org /SLF4J/Impl/staticLoggerBinder.class]slf4j: Found Binding in [jar: file: /Home/zkkafka/hadoop/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 ShellUse “help” to get list of supported commands.Use “exit” to quit this interactive shell.For Reference, please visit: http://hbase.apache.org/2.0/book.html#shellVersion 2.0.5, r76458dd074df17520ad451ded198cd832138e929, Mon Mar 18 00:41 : 49 UTC 2019Took 0.0048 SECONDS

4. Database operation

Create ‘Data_Analysis’, {Name => ‘DATA_TIME’, Versions => 1}, {Name => ‘Inamount’, Versions => 1} Create ‘Data_Analysis’, {Name => ‘Inaccount’, Versions => 1}, {Name => ‘}, {name =>’ Outaccount ‘, Versions => 1}, {Name =>’ Outamount ‘, Versions => 1}; PUT’ DATA_AALYSIS ‘,’ 2019-05-19 00:00:00 ‘,’ inaccount ‘,’ 10000 ‘; put’ data_analysis’, ‘2019-05-19 00:00:00’, ‘inamount’, ‘100’; put ‘data_analysis’,’2019-05-19 00:00:00′, ‘Outaccount’, ‘10100’; put ‘data_analysis’,’ 2019-05-19 00:00:00 ‘,’ Outamount ‘,’ 101 ‘; PUT’ DATA_ANALYSIS’,’ 2019-05-19 00:00:00 ‘,’ Inaccount: xianxishoudanaccount ‘,’ 5000 ‘; put’ data_analysis ‘,’ 2019-05-19 00:00:00 ‘,’ Inaccount: xianshangshoudanaccount ‘,’5000 ‘; put’ data_analysis ‘,’ 2019-05-19 00:00:00 ‘,’ inamount: xianxishoudanamount ‘,’ 50 ‘; put’ Data_Ananalysis ‘,’ 2019-05-19 00:00:00 ‘,’INAMOUNT: XIANSHANGSHOUDANAMOUNT ‘,’ 50 ‘;

Get ‘Data_Analysis’,’ 2019-05-19 00:00:00 ‘,’ Inaccount’get ‘Data_Ananalysis’,’ 2019-05-19 00:00:00 ‘,’ Inaccount: xianxishoudanaccount’get ‘data_analysis’,’2019-05-19 00:00:00 ‘,’ INACCOUNT: XIANSHANGSHOUDANACCOUNT’SCAN ‘DATA_AALYSIS’ROWCOLUMN + CELL2019-05-19 00:00:00 Column = inaccount :, timestamp = 1558080234354, value = 100002019-05-19 00’Data_Analysis’

[zkkafka @ yanfabu2-35 bin] $ HDFS DFS -LSR / HBASE / DATA / DEFAULT / DATA_ANALYSISLSR: DepRecated: please Use ‘ls -r’ instead.drwxr-xr-x – zkkafka supergroup0 2019-05-17 16:03 / HBase / DATA / DEFAULT / DATA_AALYSIS / .TABEDESC-RW-R – R – 2 ZKKAFKA SuperGroup 1808 2019-05-17 16:03 /HBase/Data/Default/data_Analysis/.tableDesc/.tableinfo.00000001drwxr-xr- x – zkkafka supergroup0 2019-05-17 16:03 /hbase/data/default/data_analysis/.tmpdrwxr-xr-x – zkkafka supergroup0 2019-05-17 16:11 / hbase / data / default / data_analysis / ed3abfb268f14d203f95dd0a45f80b8a-rw -r – r – 2 zkkafka supergroup 48 2019-05-17 16:03 /HBase/data/default/data_analysis/ed3abfb268f14d203f95dd0a45f80b8a/.regioninfodrwxr-Xr-X-ZKKAFKA SuperGroup0 2019-05-17 16:11 / HBase / data / default / data_analysis / ed3abfb268f14d203f95dd0a45f80b8a / .tmpdrwxr-xr-x – zkkafka supergroup0 2019-05-17 16:11 /hbase/data/default/data_analysis/ed3abfb268f14d203f95dd0a45f80b8a/.tmp/inaccountdrwxr-xr-x – zkkafka supergroup0 2019-05 -17 16:11 / HBase / Data / Default / Data_Analysi s / ed3abfb268f14d203f95dd0a45f80b8a / .tmp / inamountdrwxr-xr-x – zkkafka supergroup0 2019-05-17 16:11 /hbase/data/default/data_analysis/ed3abfb268f14d203f95dd0a45f80b8a/.tmp/outaccountdrwxr-xr-x – zkkafka supergroup0 2019-05-17 16:11 /hbase/data/default/data_analysis/ed3abfb268f14d203f95dd0a45f80b8a/.tmp/outamountdrwxr-xr-x – zkkafka supergroup0 2019-05-17 16:11 / hbase / data / default / data_analysis / ed3abfb268f14d203f95dd0a45f80b8a / inaccount-rw-r- -r– 2 zkkafka supergroup 5097 2019-05-17 16:11 / hbase / data / default / data_analysis / ed3abfb268f14d203f95dd0a45f80b8a / inaccount / 5243c1f49c7b4b0fa91d8df3a936e7a2drwxr-xr-x – zkkafka supergroup0 2019-05-17 16:

11 / hbase / data / default / data_analysis / ed3abfb268f14d203f95dd0a45f80b8a / inamount-rw-r – r– 2 zkkafka supergroup 5083 2019-05-17 16:11 / hbase / data / default / data_analysis / ed3abfb268f14d203f95dd0a45f80b8a / inamount / 9e7bc1d2a1e64987b90c3254e53c57cbdrwxr-xr -x – zkkafka supergroup0 2019-05-17 16:11 / HBase / data / default / data_analysis / ed3abfb268f14d203f95dd0a45f80b8a / Outaccount-rw-r – r – 2 zkkafka supergroup 4931 2019-05-17 16:11 / HBase / Data / default / data_analysis / ed3abfb268f14d203f95dd0a45f80b8a / outaccount / c3217f1ea5a24f3daf1d984f55c78a6bdrwxr-xr-x – zkkafka supergroup0 2019-05-17 16:11 / hbase / data / default / data_analysis / ed3abfb268f14d203f95dd0a45f80b8a / outamount-rw-r – r– 2 zkkafka supergroup 4926 2019-05-17 16:11 / HBase / DATA / Default / Data_Analysis / Ed3ABFB268F14D203F95DD0A45F80B8A / Outamount / 4061FCA2D54E471A86DA5290D9A67020 [ZKKAFKA @ Yanfabu2-35 bin] $ donor developer

Under the driving of interest, write a free thing, have a joy, and sweat, I hope you like my work, and you can support it. Of course, there is money to hold a money field (support Alipay and WeChat and buckle group), no money to hold a person, thank you.

Personal Homepage: http://knight-ble-bob.iteye.com/

Thank you for your sponsor, I will do better!

Related Posts