flume两级串联配置案例
tail-avro.conf:
从tail命令获取数据发送到avro端口
另一个节点可配置一个avro源来中继数据,发送外部存储
##################
# Name the components on this agent
a1.sources = r1
a1.sinks = k1
a1.channels = c1
# Describe/configure the source
a1.sources.r1.type = exec
a1.sources.r1.command = tail -F /root/log/access.log
# Describe the sink
a1.sinks.k1.type = avro
a1.sinks.k1.hostname = hadoop5
a1.sinks.k1.port = 4141
a1.sinks.k1.batch-size = 2
# Use a channel which buffers events in memory
a1.channels.c1.type = memory
a1.channels.c1.capacity = 1000
a1.channels.c1.transactionCapacity = 100
# Bind the source and sink to the channel
a1.sources.r1.channels = c1
a1.sinks.k1.channel = c1
avro-hdfs.conf:
从avro端口接收数据,下沉到hdfs
#####
bin/flu