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
| # grep -> sed the JSON event string and parse it with JQ | |
| curl -s https://stream.wikimedia.org/v2/stream/recentchange | | |
| grep data | | |
| sed 's/^data: //g' | | |
| jq . |
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
| Origin: Wikimedia | |
| Label: Wikimedia | |
| Suite: jessie-cloudera | |
| Codename: jessie-cloudera | |
| AlsoAcceptFor: cloudera | |
| Version: 8 | |
| Architectures: source amd64 i386 | |
| Components: cloudera | |
| UDebComponents: cloudera | |
| Update: cloudera |
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
| import java.beans.Transient | |
| import java.text.SimpleDateFormat | |
| import org.apache.avro.SchemaBuilder | |
| import org.apache.avro.generic.{GenericRecordBuilder, IndexedRecord} | |
| import org.json4s.JsonDSL._ | |
| import org.json4s._ | |
| import org.json4s.jackson.JsonMethods._ | |
| import org.wikimedia.analytics.refinery.core._ |
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
| class GaugeCounter { | |
| constructor(statsd, flush_interval_ms) { | |
| this.statsd = statsd; | |
| this.flush_interval_ms = flush_interval_ms || 5000; | |
| this.counters = {}; | |
| this.start(); | |
| } | |
| modify(key, delta) { | |
| if (!key) { |
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
| cache_status | _c1 | |
|---|---|---|
| - | 30 | |
| hit | 154443263 | |
| int | 49397862 | |
| pass | 301643378 | |
| miss | 54975448 |
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
| { | |
| "dataSources" : [ | |
| { | |
| "spec" : { | |
| "dataSchema" : { | |
| "dataSource" : "webrequest_test1", | |
| "metricsSpec" : [ | |
| { "type" : "count", "name" : "count" } | |
| ], | |
| "granularitySpec" : { |
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
| swagger: '2.0' | |
| info: | |
| version: 0.0.1 | |
| title: WMF EventStreams | |
| description: Streaming WMF event data over HTTP SSE / EventSource | |
| termsOfService: https://wikimediafoundation.org/wiki/Terms_of_Use | |
| license: | |
| name: Apache2 | |
| url: http://www.apache.org/licenses/LICENSE-2.0 | |
| paths: |
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
| hostname missing_start missing_end missing_count dt_before_missing dt_after_missing | |
| cp1068.eqiad.wmnet 1094084466 1094084466 1 2016-12-07T18:45:44 2016-12-07T18:45:44 | |
| cp1068.eqiad.wmnet 1094084494 1094084494 1 2016-12-07T18:45:44 2016-12-07T18:45:44 | |
| cp1068.eqiad.wmnet 1094084507 1094084507 1 2016-12-07T18:45:44 2016-12-07T18:45:44 | |
| cp1068.eqiad.wmnet 1094084542 1094084542 1 2016-12-07T18:45:44 2016-12-07T18:45:44 | |
| cp1068.eqiad.wmnet 1094084594 1094084594 1 2016-12-07T18:45:44 2016-12-07T18:45:44 | |
| cp1068.eqiad.wmnet 1094084663 1094084663 1 2016-12-07T18:45:44 2016-12-07T18:45:44 | |
| cp1068.eqiad.wmnet 1094084666 1094084666 1 2016-12-07T18:45:44 2016-12-07T18:45:44 | |
| cp1068.eqiad.wmnet 1094084685 1094084685 1 2016-12-07T18:45:44 2016-12-07T18:45:44 | |
| cp1068.eqiad.wmnet 1094084763 1094084763 1 2016-12-07T18:45:44 2016-12-07T18:45:44 |
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
| "use strict"; | |
| var kafka = require('node-rdkafka'); | |
| var consumer = new kafka.KafkaConsumer({ | |
| 'metadata.broker.list': 'localhost:9092', | |
| 'group.id': 'test1' | |
| }); | |
| // Non-flowing mode | |
| consumer.connect(); |