一、本例使用软件版本
flume 1.9.0
java版本build 1.8.0_252-b09
CentOS 7.6
hadoop 3.2.1(伪分布式)
二、案例要求
监控指定文件夹下的指定文件,文件新增内容后追加到hdfs中。
三、配置
# Name the components on this agent
a4.sources = r4
a4.sinks = k4
a4.channels = c4
# Describe/configure the source
a4.sources.r4.type = TAILDIR
a4.sources.r4.filegroups = f4 f5
a4.sources.r4.filegroups.f5 = /root/logs/boot1.log
a4.sources.r4.filegroups.f4 = /root/logs/boot2.log
a4.sources.r4.positionFile = /home/opt/flume/logs/position.json