Table of Contents
In short, applications store data into an HBase table. Tables are made of rows and columns. All columns in HBase belong to a particular column family. Table cells -- the intersection of row and column coordinates -- are versioned. A cell’s content is an uninterpreted array of bytes.
Table row keys are also byte arrays so almost anything can serve as a row key from strings to binary representations of longs or even serialized data structures. Rows in HBase tables are sorted by row key. The sort is byte-ordered. All table accesses are via the table row key -- its primary key.
The following example is a slightly modified form of the one on page
2 of the BigTable paper.
There is a table called webtable
that contains two column families named
contents
and anchor
.
In this example, anchor
contains two
columns (anchor:cssnsi.com
, anchor:my.look.ca
)
and contents
contains one column (contents:html
).
By convention, a column name is made of its column family prefix and a
qualifier. For example, the
column
contents:html is of the column family contents
The colon character (:
) delimits the column family from the
column family qualifier.
Table 5.1. Table webtable
Row Key | Time Stamp | ColumnFamily contents | ColumnFamily anchor |
---|---|---|---|
"com.cnn.www" | t9 | anchor:cnnsi.com = "CNN" | |
"com.cnn.www" | t8 | anchor:my.look.ca = "CNN.com" | |
"com.cnn.www" | t6 | contents:html = "<html>..." | |
"com.cnn.www" | t5 | contents:html = "<html>..." | |
"com.cnn.www" | t3 | contents:html = "<html>..." |