Hbase essential basic knowledge

table of Contents

1. Description

2. Introduction to Hbase

3. Several important concepts of Hbase

4. Hbase storage model

5.Hbase architecture


1. Description

It is mainly to sort out the most basic knowledge that you need to have when using Hbase in the actual development process, and refer to the following article.

Hbase technical details notes (on)

Hbase technical details notes (below)

2. Introduction to Hbase

Hbase is the abbreviation of Hadoop Database, which is designed according to Google's Bigtable paper.

Hbase is a distributed, column-oriented open source database (in fact, it is column-oriented to be accurate). HDFS provides reliable underlying data storage services for Hbase, MapReduce provides high-performance computing capabilities for Hbase, and Zookeeper provides stable services and Failover mechanisms for Hbase. Therefore, we say that Hbase is a high-speed storage and reading of massive data through a large number of cheap machines. Take the distributed database solution.

Hbase has the following characteristics:

Mass storage

Hbase is suitable for storing PB-level massive data, and can return data within tens to hundreds of milliseconds.

Columnar storage

The column storage here actually refers to column family storage, and Hbase stores data according to column family. There can be many columns under the column family, and the column family must be specified when the table is created.

Extremely easy to expand

 By horizontally adding RegionSever machines for horizontal expansion, the upper processing capacity of Hbase is improved, and the ability of Hbsae to serve more regions is improved.

High concurrency

The high concurrency mentioned here is mainly in the case of concurrency, the single IO latency of Hbase does not drop much. Able to obtain high-concurrency, low-latency services.

Sparse

Sparseness is mainly for the flexibility of Hbase columns. In the column family, you can specify as many columns as you want. When the column data is empty, it will not occupy storage space.

3. Several important concepts of Hbase

1) The concept of Column Family

Column Family is also called column family. Hbase divides the storage of data by column family. The column family can contain any number of columns to achieve flexible data access.

The column family must be specified when the Hbase table is created. Just as when a relational database is created, specific columns must be specified.

Hbase's column families are not as many as possible. The official recommendation is that the column families should be less than or equal to 3. The scene we use is generally a column family.

2) The concept of Rowkey

The concept of Rowkey is exactly the same as the primary key in mysql. Hbase uses Rowkey to uniquely distinguish a row of data.

Since Hbase only supports 3 query methods:

  • Single row query based on Rowkey
  • Rowkey-based range scanning
  • Full table scan

Therefore, Rowkey has a great impact on the performance of Hbase, and the design of Rowkey is particularly important.

3) The concept of Region

The concept of Region is similar to partitioning or sharding of a relational database. Hbase assigns the data of a large table to different regions based on the different ranges of Rowkey, and each region is responsible for a certain range of data access and storage. In this way, even if it is a huge table, because it is cut into unconnected regions, the latency of access is very low.

4) The concept of TimeStamp

Different timestames are used in Hbase to identify data of different versions corresponding to the same rowkey row. When writing data, if the user does not specify the corresponding timestamp, Hbase will automatically add a timestamp. In Hbase, the data of the same rowkey is arranged in reverse order of timestamp. By default, the latest version is queried, and users can specify the value of timestamp to read the data of the old version.

4. Hbase storage model

5.Hbase architecture

Guess you like

Origin blog.csdn.net/hanhan122655904/article/details/114385658