Article Directory
HBase
nosql (k,v)
Store data based on HDFS
storage structure
data model
- nameSpace: namespace
- table: table (need to declare column family column family)
- row、column
- cell: kv unit
- Version
table logical structure
- Each row of data has rowKey and column
Split storage
Horizontally split the Region and place it on different nodes
Vertically split the store and split the folders, one folder per store
Data is logically sparse with null values
The directory structure of an HBase table stored in an HDFS cluster is...
/hbase
/<Table> (集群中的表)
/<Region> (表的Regions)
/<ColumnFamiy> (表Regions的 ColumnFamilies)
/<StoreFile> (表Regions的ColumnFamilies的 StoreFiles)
table physical structure
A line of row, the actual physical storage is a cell (kv)
row key + column family + column qualifier + timestamp + type, vlaue
In the logical view, a table can be seen as a collection of sparse rows
Physically, it is stored in a column family
HBase is based on HDFS storage, which can only read and write sequentially and append records.Cannot modify previous data,
so the update and delete operations need to be specially implemented by appending (Timestamp, Type)
Architecture todo
master
RegionServer
Read and write process
use
DDL
Create a nameSpace
Create and delete table
Add, modify, delete column family
DML
Get, Put, Scan, 和 Delete
Get can only query data based on RowKey