HBase中Region, store, storefile和列簇的关系
2016-03-13 11:57
453 查看
转自: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。
原博客没有翻译,我这里大体翻译一下:RegionServer打开一个region的时候,会创建一个相应的HRegion对象。当这个HRegion被打开,他会为每一个表中的
每一个列簇创建一个Stroe实例,就想用户之前创建的那样。每一个Store实例相应地有一个或者多个StoreFile实例,StoreFile是对真正存储数据的文件(HFile)的
轻量级封装。一个Store还会有一个Memstore。每一个HRegionServer中的所有东西会共享一个HLog实例。
结合前面的图看就很清晰了。
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 会将这些小文件合并)
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。
原博客没有翻译,我这里大体翻译一下:RegionServer打开一个region的时候,会创建一个相应的HRegion对象。当这个HRegion被打开,他会为每一个表中的
每一个列簇创建一个Stroe实例,就想用户之前创建的那样。每一个Store实例相应地有一个或者多个StoreFile实例,StoreFile是对真正存储数据的文件(HFile)的
轻量级封装。一个Store还会有一个Memstore。每一个HRegionServer中的所有东西会共享一个HLog实例。
结合前面的图看就很清晰了。
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 会将这些小文件合并)
相关文章推荐
- 构建之法阅读笔记02
- 浅析操作系统----2、操作系统概述
- code1316 文化之旅
- 并查集
- 20135316王剑桥Linux内核学习笔记第三周
- 缓存数据库Memcached
- Django 学习笔记一
- 泛型方法Demo
- crontab——Linux 下的定时任务
- 第三周项目三 输出图形
- OpenCV学习笔记_用指针操作图像元素
- POJ 3169 Layout(差分约束啊)
- 开源代码托管
- 旋转方法
- c# 之下如何做定时
- iOS开发笔记--什么时候调用layoutSubviews
- Maven 常规错误一览及解决方案
- mac自带的sed和linux不一致, 需要安装gnu-sed
- linux及安全第三周总结——跟踪分析LINUX内核的启动过程
- HDU ACM 1073 Online Judge ->字符串水题