码迷,mamicode.com
首页 > Web开发 > 详细

flume + kafka 基本配置

时间:2015-08-10 18:18:21      阅读:831      评论:0      收藏:0      [点我收藏+]

标签:

apache-flume1.6 sink默认支持kafka

  • [FLUME-2242] - Flume Sink and Source for Apache Kafka

官方给的例子很贴心,可以直接运行=,=,详细配置之后慢慢看。

a1.channels = channel1
a1.sources = src-1
a1.sinks = k1

a1.sources.src-1.type = spooldir
a1.sources.src-1.channels = channel1
a1.sources.src-1.spoolDir = /opt/flumeSpool/
a1.sources.src-1.fileHeader = false

#a1.sources.src-1.type = exec
#a1.sources.src-1.command = tail -F /opt/flumeSpool/abc.log
#a1.sources.src-1.channels = channel1

a1.sinks.k1.type = org.apache.flume.sink.kafka.KafkaSink
a1.sinks.k1.topic = testlog
a1.sinks.k1.brokerList = 1.1.1.11:9092,1.1.1.12:9092
a1.sinks.k1.requiredAcks = 1
a1.sinks.k1.batchSize = 20
a1.sinks.k1.channel = channel1

a1.channels.channel1.type   = org.apache.flume.channel.kafka.KafkaChannel
a1.channels.channel1.capacity = 10000
a1.channels.channel1.transactionCapacity = 1000
a1.channels.channel1.brokerList=1.1.1.11:9092,1.1.1.12:9092
a1.channels.channel1.topic=testlog
a1.channels.channel1.zookeeperConnect=1.1.1.13:2181

flume + kafka 基本配置

标签:

原文地址:http://my.oschina.net/MaTech/blog/490243

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!