Hadoop Learning Record (iii) HBase Basic concepts

Source: Internet
Author: User
Tags md5 hash

This time start learning the HBase database.

I'm using a combination of VMware + ubuntu16.04 +hbase1.1.5 +hadoop2.6.0.

After personal installation verification, there is no conflict between versions and can be learned and developed.

The specific installation process refers to the Xiamen University Data Lab Installation tutorial, the personal feel that the installation steps are very detailed, very few suitable for the novice, as long as the basic Java and Linux Foundation can be.

The following is a link to Xiamen University Data Lab:http://dblab.xmu.edu.cn/blog/588-2/#more -588

HBase is the Hadoop database, a distributed one on Hfds. Unlike the row data store of a traditional relational database, HBase stores data as columns.

HBase Rowkey is similar to a primary key in a traditional relational database, and then the field will be present in the colfamily (column family), then the column family can have different col (column name), Colfamily:col uniquely determine a value, when inserting data to be positioned to indicate = > Row key = Column family: Column name, and only one data can be inserted at a time.

For example, now that there is a student table with the name, gender, student number, and score field in the table, the list structure of HBase will be the following:

Rowkey Row Key Info:name Info:sex Info:number Grade:math Grade:english
Student1 Kinsomy
Student1 Male
Student1 123456
Student1 100
Student1 100

Each time a piece of data is inserted, a complete record is formed in the table, which is the basic structure of the column database.

Each time you insert a row, HBase automatically comes with a timestamp timestamp to represent the version.

When defining a table, the column family of a table must be given in advance as part of the table schema definition. New Column family members can then be added as needed.

For example, when defining a table, info and grade are defined with the table, and can then be added to members of a column family, such as Name,math, when needed.

The HBase database is suitable for scenarios where the data requires multiple writes and multiple queries, and the query condition is not very complex.

Since I'm using a pseudo-distributed configuration, I'm only using a single node at this point, so there's no master and salve.

in HBase, a special catalog table named-root-and. Meta is reserved, and they maintain the list, status, and location of all the regions on the current cluster. The-root-table contains. META. List of areas of the table: META. The table contains a list of all user space regions, and the items in the table use the region name as the key. A zone name consists of the name of the owning table, the start row of the zone, the time the zone was created, and the MD5 hash of the whole.

Remember that if you want to delete a table, you first need to disable the table and then execute the delete instruction. Delete the command for a table for drop ' tablename '.

To see if a table is disable you can use the command is_disabled ' tablename ' under the HBase shell

This series of posts is for individual study notes only.

Hadoop Learning Record (iii) HBase Basic concepts

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.