更多类型的flume source:avro

技术选型:

exec source +memory channel +avro sink

avro source +memory channel +logger sink

 

avro-memory-logger.conf
avro-memory-logger.sources = avro-source
avro-memory-logger.sinks=logger-sink
avro-memory-logger.channels = memory-channel

avro-memory-logger.sources.avro-source.type = avro
avro-memory-logger.sources.avro-source.bind = Slave03
avro-memory-logger.sources.avro-source.port=44444

avro-memory-logger.sinks.logger-sink.type=logger

avro-memory-logger.channels.memory-channel.type = memory

avro-memory-logger.sources.avro-source.channels=memory-channel
avro-memory-logger.sinks.logger-sink.channel=memory-channel

 

exec-memory-avro.conf

exec-memory-avro.sources = exec-source
exec-memory-avro.sinks=avro-sink
exec-memory-avro.channels =memory-channel

exec-memory-avro.sources.exec-source.type = exec
exec-memory-avro.sources.exec-source.command = tail -F /home/calllog/data.log
exec-memory-avro.sources.exec-source.shell=/bin/sh -c

exec-memory-avro.sinks.avro-sink.type=avro
exec-memory-avro.sinks.avro-sink.hostname=Slave03
exec-memory-avro.sinks.avro-sink.port=44444

exec-memory-avro.channels.memory-channel.type = memory

exec-memory-avro.sources.exec-source.channels=memory-channel
exec-memory-avro.sinks.avro-sink.channel=memory-channel

 

注意最后一个sinks.channel没有s

 

 

你可能感兴趣的:(flume)