一、环境条件
两台服务器:CAD01-ubuntu、CAD02-ubuntu
1)CAD01-ubuntu
Flume(版本:1.8.0)
Zookeeper(版本:3.4.10)
Kafka(版本:2.4.0):其中kafka已经配置好且启动,并有hello_topic的主题
2)CAD02-ubuntu
Flume(版本:1.8.0)
二、业务流程
三、配置Flume
1)CAD02-ubuntu:exec-memory-avro.conf
#agent名字a1,source名字r1,sink名字k1,channel名字c1
a1.sources = r1
a1.sinks = k1
a1.channels = c1
#source配置
a1.sources.r1.type = exec
a1.sources.r1.command = tail -F /home/gxx/test.txt
#sink配置
a1.sinks.k1.type = avro
a1.sinks.k1.hostname = CAD01-ubuntu
a1.sinks.k1.port = 12364
#channel配置
a1.channels.c1.type = memory
#连接
a1