flume--avro输入

a1.sources = s1
a1.channels = c1
a1.sinks = k1

a1.sources.s1.type = avro
a1.sources.s1.channels = c1
a1.sources.s1.bind = wangfutai
a1.sources.s1.port = 4141

a1.channels.c1.type = file
a1.channels.c1.checkpointDir = /home/wangfutai/a/flume/checkpoint
a1.channels.c1.dataDirs = /home/wangfutai/a/flume/data

a1.sinks.k1.type = file_roll
a1.sinks.k1.channel = c1
a1.sinks.k1.sink.directory = /home/wangfutai/a/flume/netlogs
#本地回滚时间,每隔60s自动生成一个新的文本. 
a1.sinks.k1.sink.rollInterval = 60
a1.sinks.k1.sink.pathManager.prefix = network

测试 :
1.启动flume
flume-ng  agent --name a1 --conf-file  /home/wangfutai/a/flume/conf/avro.flu
2.启动命令
flume-ng avro-client --host wangfutai(IP) --port 4141(监听的端口) --filename  ./input.txt(监听的文件)

 

你可能感兴趣的:(flume)