OpenTSDB Schema

104 views
Skip to first unread message

Mostafa Gaber

unread,
Jul 18, 2011, 5:52:31 PM7/18/11
to open...@googlegroups.com
I have a question regarding the schema of OpenTSDB and how a datapoint is stored in HBase.

In the manual->schema page, an example was presented:
myservice.latency.avg 1292148123 42 reqtype=foo host=web42

The row key is the metric + base timestamp (round to 10 min) + tagname-tagvalue pair(s).
The column is 2 bytes, delta of timestamp and 4 flag bits.

Are all data points stored under the same column family and the possible columns under this column family are 2^16?

Why is the time stamp rounded to 10 min? Is that 10 min period fixed or configured to OpenTSDB?

--
Best Regards,
Mostafa Ead

tsuna

unread,
Jul 18, 2011, 6:08:33 PM7/18/11
to Mostafa Gaber, open...@googlegroups.com
On Mon, Jul 18, 2011 at 2:52 PM, Mostafa Gaber <moustaf...@gmail.com> wrote:
> Are all data points stored under the same column family and the possible

Yes, OpenTSDB uses only a single family.

> columns under this column family are 2^16?

2^14 - 1, because there are 16 bits but 4 of them are reserved. So
4095 columns per row max.

> Why is the time stamp rounded to 10 min? Is that 10 min period fixed or
> configured to OpenTSDB?

It's a compile-time constant, and it's no longer 10 minutes, it's 60
minutes. See http://groups.google.com/group/opentsdb/browse_thread/thread/14f33338a8c3d383
Did the docs mention 10 minutes somewhere that needs to be updated?

--
Benoit "tsuna" Sigoure
Software Engineer @ www.StumbleUpon.com

Mostafa Gaber

unread,
Jul 18, 2011, 7:25:19 PM7/18/11
to tsuna, open...@googlegroups.com
Thanks for your reply.

Ya, I found it 10 minutes in this document: http://opentsdb.net/schema.html
Reply all
Reply to author
Forward
0 new messages