Database Reference
In-Depth Information
The UID table schema
A separate, small table called
tsdb-uid
stores UID mappings, both forward and
reverse. Two columns exist, one called
name
that maps a UID to a string and another
called
id
that maps strings to UIDs.
Here, we will learn to keep the lookup tables in the same HBase. A small table can
be directed to be served from the memory, so you can use HBase for its in-memory
database capabilities too. Additional information can be gleaned from the OpenTSDB
design documentation found at
http://opentsdb.net/docs/build/html/user_
For practical purposes, if your NoSQL database is Cassandra and not HBase, you
will find that there is a Cassandra implementation of TSDB, called
KairosDB
, which
Summary
We learned the important NoSQL and HBase design principles related to storing
and accessing time series data. We described how to utilize time-based keys, how to
avoid region hotspotting, how to properly balance tall and narrow rows versus wide
rows, and we also saw how to glean additional information from other systems on
top of HBase, such as OpenTSDB. All this together should make us masters at storing
and using time series data in HBase and in NoSQL databases in general.
In the next chapter, we will deal with the most common design principle, that
is, denormalization. We will also discuss how to store all the objects for a user,
popularity contest, and how to store tags efficiently.