Skip to content

Instantly share code, notes, and snippets.

@M2shad0w
Created July 21, 2016 05:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save M2shad0w/e305262198768d2a9313be6a0ed96db0 to your computer and use it in GitHub Desktop.
Save M2shad0w/e305262198768d2a9313be6a0ed96db0 to your computer and use it in GitHub Desktop.
flume数据传输到Avro sink
# Define source, channel, sink
agent1.sources = r1
agent1.channels = ch2
agent1.sinks = avro-sink1
# Configure channel
agent1.channels.ch2.type = file
agent1.channels.ch2.capacity = 1000000
agent1.channels.ch2.transactionCapacity = 500000
agent1.sinks.avro-sink1.type = avro
agent1.sinks.avro-sink1.channel = ch2
agent1.sinks.avro-sink1.hostname = x.x.x.x
agent1.sinks.avro-sink1.port = 5641
# Define and configure an Spool directory source
agent1.sources.r1.channels = ch2
agent1.sources.r1.type = exec
agent1.sources.r1.command = tail -F /alidata/log/nginx/access.log
agent1.sources.r1.interceptors = i1
agent1.sources.r1.interceptors.i1.type = host
agent1.sources.r1.interceptors.i1.hostHeader = hostname
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment