flume+kafka搭建.docx


立即下载 不见你
2026-02-23
配置 下载 type c1 kafka kafka集群 安装 启动 apache-flume-1.6.0-bin 成功
35.5 KB

flume+kafka搭建
kafka集群搭建启动
详细参见文档《kafka集群搭建文档.docx》
安装启动kafka集群
下载安装flume
flume官方下载地址:https://flume.apache.org/download.html
建议下载最新的1.6.0版本的,因为1.6.0版本的集成了整合kafka的插件包可以直接配置使用
下载apache-flume-1.6.0-bin.tar.gz包
通过tar –zxvf apache-flume-1.6.0-bin.tar.gz命令解压
Flume解压既安装成功,配置conf/ flume-conf.properties文件启动完成相应的功能
配置flume连接kafka
前面kafka集群已经成功,这里只需要配置好conf/ flume-conf.properties文件,配置如下
a1.sources = r1
a1.sinks = k1
a1.channels = c1
# Describe/configure the source
a1.sources.r1.type=avro
a1.sources.r1.bind=master
a1.sources.r1.port=41414
# Describe the sink
a1.sinks.k1.type = org.apache.flume.sink.kafka.KafkaSink
a1.sinks.k1.topic = testflume
a1.sinks.k1.brokerList = 192.168.57.4:9092,192.168.57.5:9092,192.168.57.6:9092
a1.sinks.k1.requiredAcks = 1
a1.sinks.k1.batchSize = 20
a1.sinks.k1.channel = c1

# Use a channel which buffers events in memory
a1.channels.c1.type = memory
a1.channels.c1.capacity = 1000000
a1.channels.c1.transactionCapacity = 10000
# Bind the source and sink to t


配置/下载/type/c1/kafka/kafka集群/安装/启动/apache-flume-1.6.0-bin/成功/ 配置/下载/type/c1/kafka/kafka集群/安装/启动/apache-flume-1.6.0-bin/成功/
-1 条回复
登录 后才能参与评论
-->