Examples for the cassandra storage.

This commit is contained in:
Brian O'Neill 2013-05-06 23:41:58 -04:00
parent 8e8736291f
commit 17835e6e08
3 changed files with 31 additions and 0 deletions

1
examples/cassandra/client.sh Executable file
View File

@ -0,0 +1 @@
curl -sX POST "http://localhost:7070/druid/v2/?pretty=true" -H 'content-type: application/json' -d @query

19
examples/cassandra/query Normal file
View File

@ -0,0 +1,19 @@
{
"queryType": "groupBy",
"dataSource": "randSeq",
"granularity": "all",
"dimensions": [],
"aggregations":[
{ "type": "count", "name": "rows"},
{ "type": "doubleSum", "fieldName": "events", "name": "e"},
{ "type": "doubleSum", "fieldName": "outColumn", "name": "randomNumberSum"}
],
"postAggregations":[
{ "type":"arithmetic",
"name":"avg_random",
"fn":"/",
"fields":[ {"type":"fieldAccess","name":"randomNumberSum","fieldName":"randomNumberSum"},
{"type":"fieldAccess","name":"rows","fieldName":"rows"} ]}
],
"intervals":["2012-10-01T00:00/2020-01-01T00"]
}

11
examples/cassandra/query2 Normal file
View File

@ -0,0 +1,11 @@
{
"queryType": "groupBy",
"dataSource": "appevents",
"granularity": "all",
"dimensions": ["appid", "event"],
"aggregations":[
{"type":"count", "name":"eventcount"},
{"type":"doubleSum", "fieldName":"events", "name":"eventssum"}
],
"intervals":["2012-10-01T00:00/2020-01-01T00"]
}