hbase region, store, storefile和列簇,的關係



轉自:http://zhb-mccoy.iteye.com/blog/1543492

 

The HRegionServer opens the region and creates a corresponding HRegion object. When

the HRegion is opened it sets up a Store instance for each HColumnFamily for every table

as defined by the user beforehand. Each Store instance can, in turn, have one or more

StoreFile instances, which are lightweight wrappers around the actual storage file

called HFile. A Store also has a MemStore, and the HRegionServer a shared HLog in-stance。

 

hbase table中每個列簇都對應着region中的一個store,在hdfs系統中則對應着一個目錄,如果列簇中尚無數據,怎該目錄爲空,也就是該store下還沒有storefile。

 

1.house_hire_analysis 表中列簇total下無數據,另一張表fangyuan下有數據:

 

2.查看hdfs region下的內容

 

3. hbase console 如圖:


 

4.put一條記錄到house_hire_analysis中,並flush,flush將改動從memstore刷新到磁盤


 


5. hbase cosole storefile已經增加


6.新flush的kv根據策略會分別存到不同的storefiles中(最後compaction 會將這些小文件合併)



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章