Flume Avor Source
1.cd /usr/local2/flume/conf
sudo vim avro.conf:
- a1.sources = r1
- a1.sinks = k1
- a1.channels = c1
- # Describe/configure the source
- a1.sources.r1.type = avro
- a1.sources.r1.channels = c1
- a1.sources.r1.bind = 0.0.0.0
- a1.sources.r1.port = 5252
- # Describe the sink
- a1.sinks.k1.type = logger
- # 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
- shell: cd/usr/local2/flume/bin
./flume-ng agent -c . -f /usr/local/flume/conf/avro.conf -n a1 -Dflume.root.logger=INFO,console #启动日志控制台
保留这个shell
测试文件:
cd /usr/local2/flume
vim soyo.txt
再开一个shell:./flume-ng avro-client --conf conf -H localhost -p 5252 -F /usr/local/flume/soyo.txt
即可看见soyo.txt的内容