GithubHelp home page GithubHelp logo

ryanlink / data-river Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vivekkothari/data-river

0.0 0.0 0.0 59 KB

Replicates data from mysql to any datastore of your choice (relies on maxwell)

License: Apache License 2.0

Shell 1.14% Java 98.86%

data-river's Introduction

data-river Build Status Coverage Status

Replicates data from mysql to any datastore of your choice (relies on maxwell)

Maven Dependency

  • Use the following maven dependency:
<dependency>
    <groupId>com.github.vivekkothari</groupId>
    <artifactId>elastic-search-persister</artifactId>
    <version>1.2.1</version>
</dependency>

Imagine you have 2 tables in MySql, Table1 and Table2. You would have to configure maxwell. Once maxwell is properly configured, lets say you want to persist changes in the above tables in Elastic-Search. We would create 2 rivers, table1_river and table2_river. Then for each of these riverType, provide implementation of IFilter, IEnricher and IBackFiller and build a TransformerFactory

Incoming kafka message goes through following 3 steps:

Filtering: IFilter governs whether the incoming message should be processed or not. 2. Enrichment: IEnricher provides a way to enrich the incoming message. (think of joining the row with some other row) 3. Persistence: IPersister persists the message in your desired data store.

There is also and admin task on the admin port of your dropwizard application which can be used to backfill the data. Example

http://localhost:8080/admin/backfill?startDate=2016-01-01T00:00:00&endDate=2016-01-10T00:00:00&riverType=river1

Add following code in the run method of you dropwizard application. Add com.github.vivekkothari.persister.ESRiverConfiguration in your Configuration class Configure appropriately (like Elasticsearch hosts, bulk index configs etc.) then call following method.

configuration.getEsRiverConfiguration().build(environment);

The IPersister can be extended and you can add a new data store to which the messages can be stored.

data-river's People

Contributors

vivekkothari avatar

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.