Created
December 9, 2013 21:31
-
-
Save jsanda/7881321 to your computer and use it in GitHub Desktop.
RHQ's Cassandra schema for metrics data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE rhq.raw_metrics ( | |
schedule_id int, | |
time timestamp, | |
value double, | |
PRIMARY KEY (schedule_id, time) | |
) WITH COMPACT STORAGE; | |
CREATE TABLE rhq.one_hour_metrics ( | |
schedule_id int, | |
time timestamp, | |
type int, | |
value double, | |
PRIMARY KEY (schedule_id, time, type) | |
) WITH COMPACT STORAGE; | |
CREATE TABLE rhq.six_hour_metrics ( | |
schedule_id int, | |
time timestamp, | |
type int, | |
value double, | |
PRIMARY KEY (schedule_id, time, type) | |
) WITH COMPACT STORAGE; | |
CREATE TABLE rhq.twenty_four_hour_metrics ( | |
schedule_id int, | |
time timestamp, | |
type int, | |
value double, | |
PRIMARY KEY (schedule_id, time, type) | |
) WITH COMPACT STORAGE; | |
CREATE TABLE rhq.metrics_index ( | |
bucket varchar, | |
time timestamp, | |
schedule_id int, | |
PRIMARY KEY ((bucket, time), schedule_id) | |
) WITH COMPACT STORAGE; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment