add wikipedia realtime example

This commit is contained in:
Xavier Léauté 2013-08-21 17:55:52 -07:00
parent 5b6273ac3d
commit ef12439df9
2 changed files with 90 additions and 0 deletions

View File

@ -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"
]
}

View File

@ -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"
}
}]