diff --git a/examples/bin/examples/wikipedia/query.body b/examples/bin/examples/wikipedia/query.body new file mode 100644 index 00000000000..4407ccceaa8 --- /dev/null +++ b/examples/bin/examples/wikipedia/query.body @@ -0,0 +1,27 @@ +{ + "queryType":"groupBy", + "dataSource":"wikipedia", + "granularity":"minute", + "dimensions":[ + "page" + ], + "aggregations":[ + { + "type":"count", + "name":"rows" + }, + { + "type":"longSum", + "fieldName":"edits", + "name":"edits" + } + ], + "filter":{ + "type":"selector", + "dimension":"namespace", + "value":"article" + }, + "intervals":[ + "2013-06-01T00:00/2020-01-01T00" + ] +} diff --git a/examples/bin/examples/wikipedia/wikipedia_realtime.spec b/examples/bin/examples/wikipedia/wikipedia_realtime.spec new file mode 100644 index 00000000000..ae0949acd6d --- /dev/null +++ b/examples/bin/examples/wikipedia/wikipedia_realtime.spec @@ -0,0 +1,63 @@ +[{ + "schema": { + "dataSource": "wikipedia", + "aggregators": [ + {"type": "count", "name": "edits"}, + {"type": "longSum", "fieldName": "added", "name": "added"}, + {"type": "longSum", "fieldName": "deleted", "name": "deleted"}, + {"type": "longSum", "fieldName": "delta", "name": "delta"} + ], + "indexGranularity": "minute", + "shardSpec": {"type": "none"} + }, + + "config": { + "maxRowsInMemory": 50000, + "intermediatePersistPeriod": "PT2m" + }, + + "firehose": { + "type": "irc", + "nick": "wiki1234567890", + "host": "irc.wikimedia.org", + "channels": [ + "#en.wikipedia", + "#fr.wikipedia", + "#de.wikipedia", + "#ja.wikipedia" + ], + "decoder": { + "type": "wikipedia", + "namespaces": { + "#en.wikipedia": { + "": "main", + "Category": "category", + "$1 talk": "project talk", + "Template talk": "template talk", + "Help talk": "help talk", + "Media": "media", + "MediaWiki talk": "mediawiki talk", + "File talk": "file talk", + "MediaWiki": "mediawiki", + "User": "user", + "File": "file", + "User talk": "user talk", + "Template": "template", + "Help": "help", + "Special": "special", + "Talk": "talk", + "Category talk": "category talk" + } + } + }, + "timeDimension":"timestamp", + "timeFormat":"iso" + }, + + "plumber": { + "type": "realtime", + "windowPeriod": "PT3m", + "segmentGranularity": "hour", + "basePersistDirectory": "/tmp/example/wikipedia/basePersist" + } +}]