giftRecord 没法采集到的原因

# Naming the components on the current agent.
a1.sources = r1
a1.sinks = k1
a1.channels = c1
# Describing/Configuring the source.
a1.sources.r1.type = exec
a1.sources.r1.command = tail -F /home/flume/data/interceptor/moreType.txt
# Describing the sink
a1.sinks.k1.type = hdfs
a1.sinks.k1.hdfs.path = hdfs://192.168.12.204:8020/moreType/%y%m%d/%{logType}
a1.sinks.k1.hdfs.filePrefix = data-
a1.sinks.k1.hdfs.fileSuffix = .log
a1.sinks.k1.hdfs.fileType = DataStream
a1.sinks.k1.hdfs.rollInterval = 3600
a1.sinks.k1.hdfs.rollSize = 134217728
a1.sinks.k1.hdfs.rollCount = 0
a1.sinks.k1.hdfs.writeFormat = Text
a1.sinks.k1.hdfs.useLocalTimeStamp = true
# Describing the channel
a1.channels.c1.type = memory
a1.channels.c1.capacity = 1000
a1.channels.c1.transactionCapacity = 100
# Configuring the interceptor
a1.sources.r1.interceptors = i1 i2 i3 i4
a1.sources.r1.interceptors.i1.type = search_replace
a1.sources.r1.interceptors.i1.searchPattern = "type":"video_info"
a1.sources.r1.interceptors.i1.replaceString = "type":"videoInfo"
a1.sources.r1.interceptors.i2.type = search_replace
a1.sources.r1.interceptors.i2.searchPattern = "type":"user_info"
a1.sources.r1.interceptors.i2.replaceString = "type":"userInfo"
a1.sources.r1.interceptors.i3.type = search_replace
a1.sources.r1.interceptors.i3.searchPattern = "type":"gift_record"
a1.sources.r1.interceptors.i3.replaceString = "type":"giftRecord"
a1.sources.r1.interceptors.i4.type = regex_extractor
a1.sources.r1.interceptors.i4.regex = "type":"(\\w+)"
a1.sources.r1.interceptors.i4.serializers = s1
a1.sources.r1.interceptors.i4.serializers.s1.name = logType
# Binding the source, sink and channel.
a1.sources.r1.channels = c1
a1.sinks.k1.channel = c1
老师您好,不知道为什么flume拦截器这,在HDFS中总是会缺少gift_record的数据
5
收起
正在回答 回答被采纳积分+1
1回答

会跟这个换行符有关系吗,换行之后就正常了
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星