-
需求
Flume1监控本地文件
Flume2监控端口数据
Flume3接收Flume1和Flume2的日志,并将其上传至HDFS -
流程图
实现
Flume1
a1.sources = r1
a1.sinks = k1
a1.channels = c1
a1.sources.r1.type = exec
a1.sources.r1.command = tail -F /home/data/flume/log
a1.channels.c1.type = memory
a1.channels.c1.capacity = 1000
a1.channels.c1.transactionCapacity = 100
a1.sinks.k1.type = avro
a1.sinks.k1.hostname = d
a1.sinks.k1.port = 4141
a1.sources.r1.channels = c1
a1.sinks.k1