Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to deploy distributed clusters in HBase

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article shows you how to deploy distributed clusters in HBase. The content is concise and easy to understand. It will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.

1. Brief introduction

HBase is a distributed, column-oriented open source database, which is different from the general relational database. It is a database suitable for unstructured data storage. Another difference is that HBase is column-based rather than row-based. HBase uses much the same data model as BigTable. The user stores rows of data in a table. A data row has a selectable key and any number of columns, one or more columns form a ColumnFamily, and the columns under a Fmaily are in a HFile, making it easy to cache data. Tables are loosely stored, so users can define a variety of different columns for rows. In HBase, the data is sorted by primary key, and the table is divided into multiple Region by primary key.

In a distributed production environment, HBase needs to run on top of HDFS, with HDFS as its basic storage facility. The upper layer of HBase provides a Java API layer of accessed data for applications to access data stored in HBase. The cluster of HBase is mainly composed of Master and Region Server, as well as Zookeeper. The specific modules are shown below:

A brief introduction to the role of related modules in HBase:

Master

HBase Master is used to coordinate multiple RegionServer, detect the state between each RegionServer, and balance the load between RegionServer. HBaseMaster is also responsible for assigning Region to RegionServer. HBase allows multiple Master nodes to coexist, but this requires the help of Zookeeper. However, when multiple Master nodes coexist, only one Master provides services, and the other Master nodes are on standby. When the working Master node goes down, other Master will take over the HBase cluster.

Region Server

For a RegionServer, it includes multiple Region. The role of RegionServer is to manage tables and to implement read and write operations. Client connects directly to the RegionServer and communicates to obtain the data in the HBase. For Region, it is the real place to store HBase data, that is, Region is the basic unit of HBase availability and distribution. If a table is large and consists of multiple CF, the data of the table will be stored between multiple Region, and multiple storage units (Store) will be associated in each Region.

Zookeeper

For HBase, the role of Zookeeper is crucial. First of all, Zookeeper is the HA solution for HBase Master. That is, it is Zookeeper that ensures that at least one HBase Master is running. And Zookeeper is responsible for the registration of Region and Region Server. In fact, Zookeeper has become the standard framework of fault tolerance in distributed big data framework so far. Not only HBase, but almost all distributed big data-related open source frameworks rely on Zookeeper to implement HA.

HBase cluster is based on hadoop cluster, so we need to set up Hadoop cluster before building HBase cluster, and consider the compatibility of the two.

two。 Environmental preparation

(1) each server modifies the hostname, adds the hosts file, and closes the firewall

[root@c7001 ~] # cat > > / etc/hosts

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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report