一、HBase 物理模型
1、
1、Table中的所有行都按照row key的字典序排列;
2、Table在行的方向上分割为多个Region;
3、Region按大小分割的,每个表开始只有一个region,随着数据增多,region不断增大,当增大到一个阀值的时候,region就会等分会两个新的region,之后会有越来越多的region;
4、Region是HBase中分布式存储和负载均衡的最小单元。不同Region分布到不同RegionServer上;
5、Region虽然是分布式存储的最小单元,但并不是存储的最小单元。
●Region由一个或者多个Store组成,每个store保存一个columns family;
●每个Strore又由一个memStore和0至多个StoreFile组成;
●memStore存储在内存中,StoreFile存储在HDFS上。
2、
HBase数据写入流程:
put->cel1
*0)wal->hdfs
*1)memstore
*2)storefile->hdfs