1.一个单点avro例子
配置文件 testAvro.conf
#test avro sources
a1.sources=r1
a1.channels=c1
a1.sinks=k1
a1.sources.r1.type = avro
a1.sources.r1.channels=c1
a1.sources.r1.bind=192.168.1.102
a1.sources.r1.port=55555
#Use a channel which buffers events in memory
a1.channels.c1.type = memory
a1.channels.c1.capacity=1000
a1.channels.c1.transactionCapacity = 100
#sink配置
a1.sinks.k1.type=logger
a1.sinks.k1.channel=c1
这里的a1.sources.r1.bind=192.168.1.102需要修改成自己的
启动flume服务
$ bin/flume-ng agent -c conf -f conf/testAvro.conf -n a1 -Dflume.root.logger=IN