Flume Redis Sink allows you to use Redis as a Flume sink.
-
Copy this repo into flume_dir/plugins. There should also be a helloworld directory there.
-
cd into redis-flume-sink
-
Build by running 'ant'. A redis-sink_plugin.jar should be created.
-
Modify your flume-site.xml. If the following property exists then simply append the following value to the existing value with a comma.
flume.plugin.classes org.apache.flume.plugins.redis.RedisSink Comma separated list of plugin classes
- Setup your FLUME_CLASSPATH to reference the necessary jars
export FLUME_CLASSPATH=$FLUME_CLASSPATH:flume_dir/plugins/flume-redis-sink/redis-sink_plugin.jar:flume_dir/plugins/flume-redis-sink/lib/jedis-1.5.2.jar:flume_dir/plugins/flume-redis-sink/lib/commons-pool-1.5.5.jar
Usage
redisSink("host:post", db, ["list_name"])
By default, this plugin will push to a list named "flume". This value can be changed either through the config value above or by setting a string attribute on the Flume event with the name "destination_list".