Sources: flume.apache, tutorialspoint, jets3t.s3.amazonaws.com
Create flume agent's configuration(describe source, channel, sink/destination and interceptors(if any) ) file.
Execute flume using configuration file thats all..
Create Interceptors..
Add dependency for flume-core APIs.
Write Implementation for Interceptor..
Get handle on event within intercept(single and list of events both) method, implement required BI on header and data within event and return same...
Build jar
place jar in flume_home/lib ... Thats all, invoke flume-agent and your data will be intercepted before it moved to sink... in case of error or not working as expected, check /var/log/flume-agent.log for any error message
flume-ng agent --conf conf/ --conf-file $FLUME_HOME/agent.conf --name agent -Dflume.root.logger=DEBUG,console > flume.log 2>&1 &
Problem#1: 400 bad request for some bucket(in mumbai region).
Soln: Found dependency for jets3t was used. Removed jets3t and provided hadoop credentials in agent conf only.
Sources
Channels
Sinks