Created
September 13, 2015 19:06
-
-
Save gianm/fc3a1eba0dbafbf87720 to your computer and use it in GitHub Desktop.
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
Gians-MacBook-Pro:druid gian$ cat de.json | |
{ | |
"queryType":"topN", | |
"dataSource":"wikipedia2", | |
"intervals":"2015-09-13T17:01Z/PT3M", | |
"granularity":"minute", | |
"dimension":"language", | |
"threshold":100, | |
"metric":"count", | |
"aggregations":[ | |
{"type":"longSum","name":"count","fieldName":"count"} | |
] | |
} | |
Gians-MacBook-Pro:druid gian$ curl -s [email protected] -H'Content-Type: application/json' http://localhost:8080/druid/v2/ | json-pretty | |
[ | |
{ | |
"result" : [ | |
{ | |
"count" : 15, | |
"language" : "de" | |
} | |
], | |
"timestamp" : "2015-09-13T17:01:00.000Z" | |
}, | |
{ | |
"result" : [ | |
{ | |
"count" : 23, | |
"language" : "de" | |
} | |
], | |
"timestamp" : "2015-09-13T17:02:00.000Z" | |
}, | |
{ | |
"result" : [ | |
{ | |
"count" : 29, | |
"language" : "de" | |
} | |
], | |
"timestamp" : "2015-09-13T17:03:00.000Z" | |
} | |
] | |
Gians-MacBook-Pro:druid gian$ cat en.json | |
{ | |
"queryType":"topN", | |
"dataSource":"wikipedia", | |
"intervals":"2015-09-13T17:01Z/PT3M", | |
"granularity":"minute", | |
"dimension":"language", | |
"threshold":100, | |
"metric":"count", | |
"aggregations":[ | |
{"type":"longSum","name":"count","fieldName":"count"} | |
] | |
} | |
Gians-MacBook-Pro:druid gian$ curl -s [email protected] -H'Content-Type: application/json' http://localhost:8080/druid/v2/ | json-pretty | |
[ | |
{ | |
"result" : [ | |
{ | |
"count" : 95, | |
"language" : "en" | |
} | |
], | |
"timestamp" : "2015-09-13T17:01:00.000Z" | |
}, | |
{ | |
"result" : [ | |
{ | |
"count" : 102, | |
"language" : "en" | |
} | |
], | |
"timestamp" : "2015-09-13T17:02:00.000Z" | |
}, | |
{ | |
"result" : [ | |
{ | |
"count" : 91, | |
"language" : "en" | |
} | |
], | |
"timestamp" : "2015-09-13T17:03:00.000Z" | |
} | |
] | |
Gians-MacBook-Pro:druid gian$ cat union.json | |
{ | |
"queryType":"topN", | |
"dataSource":{ | |
"type":"union", | |
"dataSources":["wikipedia2","wikipedia"] | |
}, | |
"intervals":"2015-09-13T17:01Z/PT3M", | |
"granularity":"minute", | |
"dimension":"language", | |
"threshold":100, | |
"metric":"count", | |
"aggregations":[ | |
{"type":"longSum","name":"count","fieldName":"count"} | |
] | |
} | |
Gians-MacBook-Pro:druid gian$ curl -s [email protected] -H'Content-Type: application/json' http://localhost:8080/druid/v2/ | json-pretty | |
[ | |
{ | |
"result" : [ | |
{ | |
"count" : 30, | |
"language" : "de" | |
} | |
], | |
"timestamp" : "2015-09-13T17:01:00.000Z" | |
}, | |
{ | |
"result" : [ | |
{ | |
"count" : 46, | |
"language" : "de" | |
} | |
], | |
"timestamp" : "2015-09-13T17:02:00.000Z" | |
}, | |
{ | |
"result" : [ | |
{ | |
"count" : 58, | |
"language" : "de" | |
} | |
], | |
"timestamp" : "2015-09-13T17:03:00.000Z" | |
} | |
] | |
Gians-MacBook-Pro:druid gian$ cat union2.json | |
{ | |
"queryType":"topN", | |
"dataSource":{ | |
"type":"union", | |
"dataSources":["wikipedia","wikipedia2"] | |
}, | |
"intervals":"2015-09-13T17:01Z/PT3M", | |
"granularity":"minute", | |
"dimension":"language", | |
"threshold":100, | |
"metric":"count", | |
"aggregations":[ | |
{"type":"longSum","name":"count","fieldName":"count"} | |
] | |
} | |
Gians-MacBook-Pro:druid gian$ curl -s [email protected] -H'Content-Type: application/json' http://localhost:8080/druid/v2/ | json-pretty | |
[ | |
{ | |
"result" : [ | |
{ | |
"count" : 190, | |
"language" : "en" | |
} | |
], | |
"timestamp" : "2015-09-13T17:01:00.000Z" | |
}, | |
{ | |
"result" : [ | |
{ | |
"count" : 204, | |
"language" : "en" | |
} | |
], | |
"timestamp" : "2015-09-13T17:02:00.000Z" | |
}, | |
{ | |
"result" : [ | |
{ | |
"count" : 182, | |
"language" : "en" | |
} | |
], | |
"timestamp" : "2015-09-13T17:03:00.000Z" | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment