Database Reference
In-Depth Information
HBase tables, families, and cells
Let's briefly review the basic HBase data structure. HBase has tables that are similar
to SQL tables. It has families that show you ways to organize columns together.
There is nothing very special about these, except that columns belonging to one
family are guaranteed to be stored in physical proximity of each other, so that
it makes sense for you to group into families columns that are usually accessed
together. This, as the authors of BigTable (the model for HBase) state, allows the
developer to reason about the efficiency of data access.
Now, for the power and special features of HBase, all the data stored is based on the
row key . This is a unique key that identifies the logical storage of all the columns in
a row. HBase stores its data sorted by the row key. This assures fast read access.
Based on the row key, HBase stores the row. Rows consist of columns. Columns
are created dynamically by storing [column_name] and [column_value] . Thus,
you don't need to define a column name before using it, and not all columns have
to be present in every row. This is why HBase is called a column-oriented store.
In addition, each cell is stored with a time stamp.
This can be summarized concisely by stating that HBase is a distributed, giant hash
table, with sorted keys for fast access. This might not reflect all the power of HBase,
but it serves as a good first approximation. For more details, you can refer to the
topic HBase Essentials by Packt Publishing.
All this becomes very clear when you use the HBase shell, so let's proceed to it
right away.
The HBase shell
The HBase shell is great because it gives you the first handle on HBase. It allows you
to create, modify, and delete tables; put and get values; and run scans. It is only
a simple interface and not really programmable (for that you still need Java,
but it is a start.)
Now, it is time to start creating the HBase shell. Type in the following command,
which you can type on the Linux command prompt:
hbase shell
 
Search WWH ::




Custom Search