In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces "the installation and deployment method of HBase". In the daily operation, I believe that many people have doubts about the installation and deployment method of HBase. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "installation and deployment method of HBase". Next, please follow the editor to study!
First, prepare the environment
Java-- jdk-8u121-linux-x64.tar.gz
Hadoop--hadoop-2.7.4.tar.gz (jdk1.7 will report an error)
Hbase-- hbase-1.2.0-bin.tar.gz
Zookeeper-- zookeeper-3.4.5.tar.gz
For all jar packages in this series of tutorials, please follow the Wechat official account: Spark Advanced play and enter software to get it.
Centos 6.5 is the operating system used in this paper.
Second, install Zookeeper
The stand-alone installation of Zookeeper is easy. The main purpose is to configure the data storage directory.
1. Configure environment variables
# zookeeper
Export ZOOKEEPER_HOME=/opt/modules/zookeeper-3.4.5/
Export ZOOKEEPER_CONF_DIR=$ZOOKEEPER_HOME/conf
Export PATH=$PATH:$ZOOKEEPER_HOME/bin
2. Create a data directory
Create a data subdirectory on the current node of Zookeeper
Mkdir-p / opt/modules/zookeeper-3.4.5/data
3. Modify zoo.cfg
Mv zoo_sample.cfg zoo.cfg
Modify the configuration zoo.cfg, and the following attribute is the data directory of the Zookeeper we created.
DataDir=/opt/modules/zookeeper-3.4.5/data
4, start Zookeeper
ZkServer.sh start
5. Check the status
ZkServer.sh status
Third, install and test hbase
The role of Hbase is also simple, the server is the master,regionserver,Zookeeper, and the rest is the administrative client or the data insertion and reading client. There are several main steps to configure the use of hbase.
1, regionserver configuration
The main thing is to configure the hostname, in fact, it can be started one by one, of course, you can also write a batch script.
Luffy.OnePiece.com
2, add the following configuration to hbse-site.xml
First create a data/tmp directory.
Mkdir-p / opt/modules/hbase-1.2.0/data/tmp
Then, modify the hbase-site.xml
Hbase.tmp.dir
/ opt/modules/hbase-1.2.0/data/tmp
Hbase.rootdir
Hdfs://Luffy.OnePiece.com:8020/hbase
Hbase.cluster.distributed
True
Hbase.zookeeper.quorum
Luffy.OnePiece.com
3. Start hbase
Start Zookeeper first, because hbase is dependent on Zookeeper, and then start hbase.
Configure environment variables
# HBase
Export HBASE_HOME=/opt/modules/hbase-1.2.0
Export HBASE_CONF_DIR=$HBASE_HOME/conf
Export PATH=$PATH:$HBASE_HOME/bin
Start hbase
Hbase-daemon.sh start master
Hbase-daemon.sh start regionserver
4, which can be viewed in the web browser
The previous default port is 60010, while the new version is 16010, enter it in the browser
Http://luffy.onepiece.com:16010
You can see
5. View hbase information in Zookeeper
6. Test the hbase instruction
Enter first, hbase shell wait
Create a tabl
Create 'user','info'
Insert data
Put 'user','1001','info:name','lisi'
Put 'user','1001','info:age','18'
Put 'user','1001','info:sex','male'
View data
Scan 'user'
Use get to view data
Delete data
Forbidden meter
Delete tabl
Delete the table first disable, then delete.
Fourth, summary
Hbase is a NoSQL database running on Hadoop. It is a distributed and extensible big data repository, which means that HBase can take advantage of HDFS's distributed processing model.
And benefit from Hadoop's MapReduce program model. This means storing many large tables with billions of rows and millions of columns on a set of commercial hardware. Remove the advantages of Hadoop
Potential, HBase itself is a very powerful database, it can integrate the ability of key/value storage mode to bring real-time queries, as well as offline processing or batch processing through MapReduce.
The ability to.
HBase is not a relational database, it requires different ways to define your data model. HBase actually defines a four-dimensional data model. Here is the definition of each dimension:
Row key: each row has a unique row key, which has no data type, and is considered to be a byte array internally.
Column clusters: data is organized into column clusters in rows, and each row has the same column cluster, but between rows, the same column cluster does not need to have the same column modifier. In the engine, HBase stores column clusters in its own data files, so they need to be defined in advance. In addition, changing column clusters is not easy.
Column modifier: the column cluster defines the real column, which is called the column modifier. You can think of the column modifier as the column itself.
At this point, the study on the "method of installation and deployment of HBase" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.