作为前一篇的修改版,取出来kafka-in.conf文件中的sink和kafka-out.conf文件中的source。
前一篇链接:https://blog.csdn.net/m0_37890482/article/details/81130840
以下配置文件都存储于 /etc/flume-ng/conf/ 下面
kafka-in.conf
#--------文件从本地路径到kafka-in配置文件------#
#--------------Edit by cheengvho-------------#
# 指定Agent的组件名称
agent1.sources = file_source
agent1.channels = kafka_channel
#-------file_source(要监听的路径)---------
agent1.sources.file_source.interceptors = i1
agent1.sources.file_source.interceptors.i1.type = regex_extractor
agent1.sources.file_source.interceptors.i1.regex = ^(?:\\n)?(\\d\\d\\d\\d-\\d\\d-\\d\\d\\s\\d\\d:\\d\\d)
agent1.sources.file_source.interceptors.i1.serializers = s1
agent1.sources.file_source.interceptors.i1.serializers.s1.type = org.apache.flume.interceptor.RegexExtractorInterceptorMillisSerializer
agent1.sources.file_source.interceptors.i1.