From fc74333a28ddab0495c0875ae9c3511081633772 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stef=C3=A1n=20Freyr=20Stef=C3=A1nsson?= Date: Sat, 13 Jul 2013 16:14:10 +0000 Subject: [PATCH] adding an example dir to test the rabbitmq implementation --- examples/bin/examples/rabbitmq/query.body | 19 ++++++++++ .../examples/rabbitmq/rabbitmq_realtime.spec | 36 +++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 examples/bin/examples/rabbitmq/query.body create mode 100644 examples/bin/examples/rabbitmq/rabbitmq_realtime.spec diff --git a/examples/bin/examples/rabbitmq/query.body b/examples/bin/examples/rabbitmq/query.body new file mode 100644 index 00000000000..05007c955b9 --- /dev/null +++ b/examples/bin/examples/rabbitmq/query.body @@ -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"] +} diff --git a/examples/bin/examples/rabbitmq/rabbitmq_realtime.spec b/examples/bin/examples/rabbitmq/rabbitmq_realtime.spec new file mode 100644 index 00000000000..25ce1182554 --- /dev/null +++ b/examples/bin/examples/rabbitmq/rabbitmq_realtime.spec @@ -0,0 +1,36 @@ +[{ + "schema": { + "dataSource": "randseq", + "aggregators": [ + {"type": "count", "name": "events"}, + {"type": "doubleSum", "name": "outColumn", "fieldName": "inColumn"} + ], + "indexGranularity": "minute", + "shardSpec": {"type": "none"} + }, + + "config": { + "maxRowsInMemory": 50000, + "intermediatePersistPeriod": "PT1m" + }, + + "firehose" : { "type" : "rabbitmq", + "consumerProps" : { "username": "test-dude", + "password": "test-word", + "virtualHost": "test-vhost", + "host": "localhost" + }, + "queue" : "druidtest", + "exchange": "test-exchange", + "routingKey": "#", + "parser" : { "timestampSpec" : { "column" : "utcdt", "format" : "iso" }, + "data" : { "format" : "json" }, + "dimensionExclusions" : ["wp"] } }, + + "plumber": { + "type": "realtime", + "windowPeriod": "PT5m", + "segmentGranularity": "hour", + "basePersistDirectory": "/tmp/example/rand_realtime/basePersist" + } +}]