Chinaunix首页 | 论坛 | 博客
  • 博客访问: 380873
  • 博文数量: 46
  • 博客积分: 1476
  • 博客等级: 上尉
  • 技术积分: 428
  • 用 户 组: 普通用户
  • 注册时间: 2006-01-19 13:17
文章分类

全部博文(46)

文章存档

2015年(8)

2014年(20)

2013年(7)

2012年(4)

2011年(1)

2010年(2)

2009年(1)

2008年(2)

2006年(1)

我的朋友

分类: NOSQL

2013-08-21 15:08:21

The logical entities in an HBase schema are as follows:

■ Table—HBase organizes data into tables. Table names are Strings and composed of characters that are safe for use in a file system path.

■ Row—Within a table, data is stored according to its row. Rows are identified uniquely by their rowkey. Rowkeys don’t have a data type and are always treated as a byte[].

■ Column family—Data within a row is grouped by column family. Column families also impact the physical arrangement of data stored in HBase. For this reason, they must be defined up front and aren’t easily modified. Every row in a table has the same column families, although a row need not store data in all its families. Column family names are Strings and composed of characters that are
safe for use in a file system path.

■ Column qualifier—Data within a column family is addressed via its column qualifier, or column. Column qualifiers need not be specified in advance. Column qualifiers need not be consistent between rows. Like rowkeys, column qualifiers don’t have a data type and are always treated as a byte[].

■ Cell—A combination of rowkey, column family, and column qualifier uniquely identifies a cell. The data stored in a cell is referred to as that cell’s value. Values also don’t have a data type and are always treated as a byte[].

■ Version—Values within a cell are versioned. Versions are identified by their timestamp, a long. When a version isn’t specified, the current timestamp is used as the basis for the operation. The number of cell value versions retained by HBase is configured via the column family. The default number of cell versions is three.

These six concepts form the foundation of HBase. They’re exposed to the user via the logical view presented by the API. They’re the building blocks on which the implementation manages data physically on disk. Keeping these six concepts straight in your mind will take you a long way in understanding HBase.  A unique data value in HBase is accessed by way of its coordinates. The complete coordinates to a value are rowkey, column family, column qualifier, and version.

hbase is a sorted map of maps:   Map>>>

HBase sorts the version timestamp in descending order so the newest data is always on top.
阅读(3387) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~