Giter VIP home page Giter VIP logo

flume-redis's Introduction

flume-redis

将采集到数据通过 Redis Lua 进行 ETL,千亿级的数据进行统计与抽取进行毫秒级的实时处理。

使用 Flume Filter 拦截器 构造Redis Lus 脚本

Gson gson = new Gson();

Map full= new HashMap();
full.put("script","return redis.call('ZADD',KEYS[2],KEYS[1],KEYS[3])");
full.put("args",new ArrayList());
full.put("keys",split);

String json = gson.toJson(full);   

支持 redis-lua 脚本以及参数传递

a1.sinks.k1.type = com.supermy.redis.flume.redis.sink.RedisEVALSink
a1.sinks.k1.host = 132.194.43.153
a1.sinks.k1.key = jplist
a1.sinks.k1.batch_size = 10000

License

Example configuration

Example source configuration:

agent.sources.redisSource.type = com.supermy.redis.flume.redis.source.RedisSource
agent.sources.redisSource.host = localhost
agent.sources.redisSource.key = logstash
agent.sources.redisSource.batch_size = 500
agent.sources.redisSource.serializer = com.supermy.redis.flume.redis.source.serializer.LogstashDeSerializer

Example sink configuration:

agent.sinks.redisSink.type = com.supermy.redis.flume.redis.sink.RedisSink
agent.sinks.redisSink.host = localhost
agent.sinls.redisSink.key = logstash
agent.sinks.redisSink.batch_size = 500
agent.sinks.redisSink.serializer = com.supermy.redis.flume.redis.sink.serializer.LogstashSerializer

Building

This project uses maven for building all the artefacts. You can build it with the following command: mvn clean install

This will build the following artefacts:

  • flume-redis-dist/target/flume-redis-1.0.0-SNAPSHOT-dist.tar.gz The tarball can be directly unpacked into Apache Flume plugins.d directory

  • flume-redis-dist/target/rpm/tango-flume-redis/RPMS/noarch/tango-flume-redis-1.0.0-SNAPSHOT*.noarch.rpm This package will install itself on top of Apache Flume package and be ready for use right away.

flume-redis's People

Contributors

supermy avatar

Watchers

James Cloos 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.