博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
flume + kafka 基本配置
阅读量:7215 次
发布时间:2019-06-29

本文共 1188 字,大约阅读时间需要 3 分钟。

  hot3.png

apache-flume1.6 sink默认支持kafka

  • [] - Flume Sink and Source for Apache Kafka

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

a1.channels = channel1

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

a1.sources.src-1.type = spooldir  #实时性要求不高的话,可以用这种方式,tail实际效率也挺低的

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启动命令:

../bin/flume-ng agent --conf-file flume-conf.properties --name myagent -Dflume.monitoring.type=http -Dflume.monitoring.port=34545

转载于:https://my.oschina.net/MaTech/blog/490243

你可能感兴趣的文章
三层结构视频中的DBHelper.cs
查看>>
[转载] 信息系统项目管理师视频教程——18 项目沟通管理
查看>>
在Windows下建立QT开发环境
查看>>
Jedis、JedisPool、ShardedJedis和ShardedJedisPool,java对redis的基本操作
查看>>
[转载] 致命伴侣
查看>>
HTML5 localStorage本地存储实际应用举例
查看>>
Scala访问修饰符
查看>>
实习感悟
查看>>
产品经理网站小结
查看>>
Bootstrap 附加导航插件
查看>>
如何设置启动SMTP、POP3以及IMAP4的SSL服务端口?
查看>>
自制函数strcpy
查看>>
gSoap开发(三)——WSDL简介
查看>>
软件RAID5项目实战!!!
查看>>
Java基础学习总结(21)——数组
查看>>
js格式化日期
查看>>
定时与延时任务
查看>>
Squid 日志分析 和反向代理
查看>>
Hadoop的安装及一些基本概念解释
查看>>
大容量分区命令parted
查看>>