Coder Social home page Coder Social logo

wikimedia / analytics-kafkatee Goto Github PK

View Code? Open in Web Editor NEW
22.0 22.0 0.0 81 KB

Github mirror of "analytics/kafkatee" - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing

Emacs Lisp 0.04% Makefile 1.12% C 91.61% Python 7.23%

analytics-kafkatee's Introduction

kafkatee - Apache Kafka consumer with multiple inputs and outputs

Copyright (c) 2014 Wikimedia Foundation

Copyright (c) 2014 Magnus Edenhill

Description

kafkatee consumes messages from one or more Kafka topics and writes the messages to one or more outputs - either command pipes or files.

It provides simple transformation from JSON to arbitrary string output controlled through configuration.

Each output has a configurable sample rate.

Features:

  • Supported input types: Kafka consumer or piped command.
  • Supported output types: Piped command or file.
  • Configuration file syntax is backwards compatible with Wikimedia's udp2log
  • Configurable output queue size
  • Memory frugal: message payload is shared by all output queues
  • Configured with configuration file
  • Operates as a daemon (daemonization, pidfile)
  • Closes/stops and reopens/restarts all inputs and outputs on SIGHUP.

Documentation

See kafkatee.conf.example for an annotated configuration file explaining available configuration properties.

Build

Dependencies

  • librdkafka-dev >= 0.8.3
  • libyajl-dev (yajl1 or yajl2)

Compile

make

Install

make install
# or:
DESTDIR=/alternate/buildroot make install

Run tests

make test

analytics-kafkatee's People

Contributors

edenhill avatar elukey avatar filippog avatar j6r33n avatar lunartwilight avatar ottomata avatar paravoid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

analytics-kafkatee's Issues

No new pipe input means kafkatee will not shutdown properly on SIGTERM

If there is no new input on a configured piped input, kafkatee will hang on an fgets() call in input.c This causes kafkatee to not clean up children and pidfile properly.

We should probably use select() with a timeout instead of fgets() to poll for new data to read. I just had a quick look at implementing this, but since the code in input_pipe_main() uses FILE * instead of fds for all of its error checking, it requires more than just modification of the while loop for reading.

I suppose this would be difficult, because select() might indicate that there is data ready to be read before a full line has been written to the piped input?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.