forked from facebookarchive/scribe
-
Notifications
You must be signed in to change notification settings - Fork 1
Cassandra Store
goir edited this page Feb 21, 2012
·
1 revision
The Cassandra Store can store any kind of data including increasing/decreasing of counter Columns. Each Message must be a JSON String like the examples below.
To save bandwith you can compress the Message with gz. The Store automagically detects whether a message is compressed or not.
To Store any kind of data you must use a Format like this
{
"rowKey": "rowKey",
"scName": "scKey",
"data": {
"column1": "column value 1",
"column2": 10,
...
}
}
scName is just required if you write into a Super Column Family.
If you want to increase/decrease a counter column you need to specify the extra counter flag like so:
{
"rowKey": "rowKey",
"scName": "scKey",
"counter": true,
"data": {
"column1": 1,
"column2": -10,
...
}
}